Skip to content

Commit 4064976

Browse files
authored
fix null exception
fixes #254
1 parent fb0de8a commit 4064976

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/kotlin/com/emberjs/utils/EmberUtils.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -862,9 +862,9 @@ class EmberUtils {
862862
}
863863
}
864864

865-
if (cls is TypeScriptVariable) {
865+
if (cls is TypeScriptVariable && cls.children.getOrNull(1) != null) {
866866
jsTemplate = f.containingFile.viewProvider.findElementAt(cls.children[1].textOffset, JavaScriptSupportLoader.TYPESCRIPT)
867-
} else if (cls is JSVariable) {
867+
} else if (cls is JSVariable && cls.children.getOrNull(1) != null) {
868868
jsTemplate = f.containingFile.viewProvider.findElementAt(cls.children[1].textOffset, JavaScriptSupportLoader.ECMA_SCRIPT_6)
869869
}
870870
}

0 commit comments

Comments
 (0)