Skip to content

Commit 01a4bfa

Browse files
committed
fix #1088
1 parent 4876ff3 commit 01a4bfa

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Diff for: changelog.md

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
* `FIX` [#1051](https://github.com/sumneko/lua-language-server/issues/1051)
3333
* `FIX` [#1072](https://github.com/sumneko/lua-language-server/issues/1072)
3434
* `FIX` [#1077](https://github.com/sumneko/lua-language-server/issues/1077)
35+
* `FIX` [#1088](https://github.com/sumneko/lua-language-server/issues/1088)
3536
* `FIX` runtime errors
3637

3738
## 3.1.0

Diff for: script/vm/compiler.lua

+4-2
Original file line numberDiff line numberDiff line change
@@ -803,8 +803,10 @@ function vm.compileCallArg(arg, call, index)
803803
if call.node.special == 'pcall'
804804
or call.node.special == 'xpcall' then
805805
local fixIndex = call.node.special == 'pcall' and 1 or 2
806-
callNode = vm.compileNode(call.args[1])
807-
compileCallArgNode(arg, call, callNode, fixIndex, index - fixIndex)
806+
if call.args and call.args[1] then
807+
callNode = vm.compileNode(call.args[1])
808+
compileCallArgNode(arg, call, callNode, fixIndex, index - fixIndex)
809+
end
808810
end
809811
return vm.getNode(arg)
810812
end

0 commit comments

Comments
 (0)