Skip to content

Commit ce2b607

Browse files
committed
check nil
1 parent 90b95a0 commit ce2b607

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

script/vm/compiler.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1685,7 +1685,7 @@ local compilerSwitch = util.switch()
16851685
if state.type == 'doc.return'
16861686
or state.type == 'doc.param' then
16871687
local func = state.bindSource
1688-
if func.type == 'function' then
1688+
if func and func.type == 'function' then
16891689
local node = guide.getFunctionSelfNode(func)
16901690
if node then
16911691
vm.setNode(source, vm.compileNode(node))

0 commit comments

Comments
 (0)