Skip to content

Commit 53e115d

Browse files
committed
fix(DevInsCompiler): ensure safe access to nextSibling text using runReadAction #379
1 parent 1e4d6d1 commit 53e115d

File tree

1 file changed

+1
-1
lines changed
  • exts/devins-lang/src/main/kotlin/cc/unitmesh/devti/language/compiler

1 file changed

+1
-1
lines changed

exts/devins-lang/src/main/kotlin/cc/unitmesh/devti/language/compiler/DevInsCompiler.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ class DevInsCompiler(
275275
logger.warn("Illegal type: ${variableStart.elementType}")
276276
return
277277
}
278-
val variableId = variableStart.nextSibling?.text
278+
val variableId = runReadAction { variableStart.nextSibling?.text }
279279
// val variables = ToolHubVariable.lookup(myProject, variableId)
280280
// val file = element.containingFile
281281
// VariableTemplateCompiler(file.language, file, element, editor).compile(usedText).let {

0 commit comments

Comments
 (0)