Skip to content

Commit 62865d9

Browse files
committed
fix null ptr exception
1 parent bfcc4ea commit 62865d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/kotlin/com/emberjs/hbs/HbsLocalCompletion.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ class HbsLocalCompletion : CompletionProvider<CompletionParameters>() {
154154
}
155155

156156
fun addHelperCompletions(element: PsiElement, result: CompletionResultSet) {
157-
val file = EmberUtils.followReferences(element.children[0])
157+
val file = EmberUtils.followReferences(element.children.firstOrNull())
158158
var func: JSFunction? = null
159159
if (file is JSFunction) {
160160
func = file

0 commit comments

Comments
 (0)