Skip to content

Commit ee2b58d

Browse files
authored
fix nil pointer deref (#13)
1 parent 838a7e3 commit ee2b58d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/compiler/fileloader.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -788,6 +788,9 @@ func getRawTypeValue(node *ast.Node) *string {
788788
}
789789

790790
func getModuleLiteralImportAttributeType(node *ast.StringLiteralLike) *string {
791+
if node == nil {
792+
return nil
793+
}
791794
parent := node.Parent
792795
if parent == nil {
793796
return nil

0 commit comments

Comments
 (0)