diff options
-rw-r--r-- | changelog.md | 1 | ||||
-rw-r--r-- | script/vm/compiler.lua | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/changelog.md b/changelog.md index ff2d2c1e..e6ecca52 100644 --- a/changelog.md +++ b/changelog.md @@ -32,6 +32,7 @@ * `FIX` [#1051](https://github.com/sumneko/lua-language-server/issues/1051) * `FIX` [#1072](https://github.com/sumneko/lua-language-server/issues/1072) * `FIX` [#1077](https://github.com/sumneko/lua-language-server/issues/1077) +* `FIX` [#1088](https://github.com/sumneko/lua-language-server/issues/1088) * `FIX` runtime errors ## 3.1.0 diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua index 32cc7128..ec3b28bc 100644 --- a/script/vm/compiler.lua +++ b/script/vm/compiler.lua @@ -803,8 +803,10 @@ function vm.compileCallArg(arg, call, index) if call.node.special == 'pcall' or call.node.special == 'xpcall' then local fixIndex = call.node.special == 'pcall' and 1 or 2 - callNode = vm.compileNode(call.args[1]) - compileCallArgNode(arg, call, callNode, fixIndex, index - fixIndex) + if call.args and call.args[1] then + callNode = vm.compileNode(call.args[1]) + compileCallArgNode(arg, call, callNode, fixIndex, index - fixIndex) + end end return vm.getNode(arg) end |