summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-14 23:20:09 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-14 23:20:42 +0800
commitbfe3e71009a4bb575a9978a4b5749b10122a2bc6 (patch)
treefcb56a9491cc21d2d362aed4e478bd1c3f4a890b /script
parentd4bb6e30f9d02cc180a21d6645cd06d4e8645a00 (diff)
downloadlua-language-server-bfe3e71009a4bb575a9978a4b5749b10122a2bc6.zip
checknil
Diffstat (limited to 'script')
-rw-r--r--script/vm/compiler.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua
index 1d79cc1b..173cf7d7 100644
--- a/script/vm/compiler.lua
+++ b/script/vm/compiler.lua
@@ -1003,7 +1003,9 @@ local compilerSwitch = util.switch()
: call(function (source)
if source.returns then
for _, rtn in ipairs(source.returns) do
- vm.setNode(source, vm.compileNode(rtn[1]))
+ if rtn[1] then
+ vm.setNode(source, vm.compileNode(rtn[1]))
+ end
end
end
end)