summaryrefslogtreecommitdiff
path: root/script/vm/compiler.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-07-04 20:48:41 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-07-04 20:48:41 +0800
commitf8104cc646f3b374c98b5c22f91ec75d5731b445 (patch)
tree0f45c9422d802d52595dd4549741d7c41c651007 /script/vm/compiler.lua
parent3e18b81da356588b9e9749092d9833ca85e88e26 (diff)
downloadlua-language-server-f8104cc646f3b374c98b5c22f91ec75d5731b445.zip
fix #1275 check nil
Diffstat (limited to 'script/vm/compiler.lua')
-rw-r--r--script/vm/compiler.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua
index 37042d76..e361d706 100644
--- a/script/vm/compiler.lua
+++ b/script/vm/compiler.lua
@@ -1012,7 +1012,7 @@ local function compileLocal(source)
-- for x in ... do
if source.parent.type == 'in' then
compileForVars(source.parent)
- local keyNode = source.parent._iterVars[source]
+ local keyNode = source.parent._iterVars and source.parent._iterVars[source]
if keyNode then
vm.setNode(source, keyNode)
end