summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-08-11 18:26:33 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-08-11 18:26:33 +0800
commitce2b607822d142afdcd0bd5ca7156b43ea011a56 (patch)
tree8c394d9c9e2101c3eff96f1a5c03590c8cebf51e /script
parent90b95a06eb43b469f53c147509a4d67e1c567fb5 (diff)
downloadlua-language-server-ce2b607822d142afdcd0bd5ca7156b43ea011a56.zip
check nil
Diffstat (limited to 'script')
-rw-r--r--script/vm/compiler.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua
index 7d10561e..f07bcdc6 100644
--- a/script/vm/compiler.lua
+++ b/script/vm/compiler.lua
@@ -1685,7 +1685,7 @@ local compilerSwitch = util.switch()
if state.type == 'doc.return'
or state.type == 'doc.param' then
local func = state.bindSource
- if func.type == 'function' then
+ if func and func.type == 'function' then
local node = guide.getFunctionSelfNode(func)
if node then
vm.setNode(source, vm.compileNode(node))