Skip to content

Commit f8104cc

Browse files
committed
fix #1275 check nil
1 parent 3e18b81 commit f8104cc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* `type.weakNilCheck`
66
* `FIX` [#1256](https://github.com/sumneko/lua-language-server/issues/1256)
77
* `FIX` [#1257](https://github.com/sumneko/lua-language-server/issues/1257)
8+
* `FIX` [#1275](https://github.com/sumneko/lua-language-server/issues/1275)
89

910
## 3.4.0
1011
`2022-6-29`

script/vm/compiler.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ local function compileLocal(source)
10121012
-- for x in ... do
10131013
if source.parent.type == 'in' then
10141014
compileForVars(source.parent)
1015-
local keyNode = source.parent._iterVars[source]
1015+
local keyNode = source.parent._iterVars and source.parent._iterVars[source]
10161016
if keyNode then
10171017
vm.setNode(source, keyNode)
10181018
end

0 commit comments

Comments
 (0)