Skip to content

Commit

Permalink
check nil
Browse files Browse the repository at this point in the history
  • Loading branch information
sumneko committed Aug 11, 2023
1 parent 90b95a0 commit ce2b607
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion script/vm/compiler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit ce2b607

Please sign in to comment.