diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-07-04 20:48:41 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-07-04 20:48:41 +0800 |
commit | f8104cc646f3b374c98b5c22f91ec75d5731b445 (patch) | |
tree | 0f45c9422d802d52595dd4549741d7c41c651007 | |
parent | 3e18b81da356588b9e9749092d9833ca85e88e26 (diff) | |
download | lua-language-server-f8104cc646f3b374c98b5c22f91ec75d5731b445.zip |
fix #1275 check nil
-rw-r--r-- | changelog.md | 1 | ||||
-rw-r--r-- | script/vm/compiler.lua | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/changelog.md b/changelog.md index 7c5295b4..aa2e95c5 100644 --- a/changelog.md +++ b/changelog.md @@ -5,6 +5,7 @@ * `type.weakNilCheck` * `FIX` [#1256](https://github.com/sumneko/lua-language-server/issues/1256) * `FIX` [#1257](https://github.com/sumneko/lua-language-server/issues/1257) +* `FIX` [#1275](https://github.com/sumneko/lua-language-server/issues/1275) ## 3.4.0 `2022-6-29` 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 |