Fix invalid type assertion in LoadBytes (#733)

Fixes #732
This commit is contained in:
Cameron Moore
2022-01-05 08:17:32 -06:00
committed by GitHub
parent 1baee4630f
commit fed1464066
2 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -471,7 +471,7 @@ func LoadBytes(b []byte) (tree *Tree, err error) {
if _, ok := r.(runtime.Error); ok {
panic(r)
}
err = errors.New(r.(string))
err = fmt.Errorf("%s", r)
}
}()