We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 968e8f8 commit 1d9cec9Copy full SHA for 1d9cec9
src/main/kotlin/com/emberjs/utils/EmberUtils.kt
@@ -263,12 +263,16 @@ class EmberUtils {
263
val TS = JavaScriptSupportLoader.TYPESCRIPT
264
265
val inJs = view.findElementAt(element.startOffset, TS) ?: view.findElementAt(element.startOffset, JS)
266
- cls = PsiTreeUtil.findFirstParent(inJs) { it is JSClass } as JSElement?
+ cls = inJs?.parent as? JSClass
267
if (cls == null) {
268
cls = inJs?.parent?.children?.last() as? TypeScriptVariable
269
if (cls != null) {
270
return cls
271
}
272
+ cls = inJs?.prevSibling?.children?.last() as? TypeScriptVariable
273
+ if (cls != null) {
274
+ return cls
275
+ }
276
277
278
cls = (inJs?.parent as? TypeScriptAsExpression)
0 commit comments