Skip to content

Commit a9b3a7a

Browse files
committed
fix hbs imports
1 parent cec8e94 commit a9b3a7a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ open class HbsModuleReference(element: PsiElement, val moduleType: String) :
3232
private val psiManager: PsiManager by lazy { PsiManager.getInstance(project) }
3333

3434
private val hasHbsImports by lazy {
35-
var f = element.containingFile
35+
var f = element.containingFile.originalFile
3636
if (element.originalVirtualFile is VirtualFileWindow) {
3737
val psiManager = PsiManager.getInstance(element.project)
3838
f = psiManager.findFile((element.originalVirtualFile as VirtualFileWindow).delegate)!!
3939
}
4040
NodeModuleManager.getInstance(element.project).collectVisibleNodeModules(f.virtualFile).find { it.name == "ember-hbs-imports" || it.name == "ember-template-imports" }
4141
}
42-
private val useImports = hasHbsImports != null
42+
private val useImports by lazy { hasHbsImports != null }
4343

4444

4545
open fun matches(module: EmberName) =

0 commit comments

Comments
 (0)