Skip to content

Commit 358ad45

Browse files
committed
fix: remove redundant n.args check
n.args is guaranteed to exist for function/doc.type.function nodes, only n.args[aindex] needs to be checked.
1 parent 8ca1599 commit 358ad45

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
@@ -1354,7 +1354,7 @@ local function compileFunctionParam(func, source)
13541354
local found = false
13551355
for n in funcNode:eachObject() do
13561356
if (n.type == 'doc.type.function' or n.type == 'function')
1357-
and n.args and n.args[aindex] and n.args[aindex] ~= source
1357+
and n.args[aindex] and n.args[aindex] ~= source
13581358
then
13591359
local argNode = vm.compileNode(n.args[aindex])
13601360
for an in argNode:eachObject() do

0 commit comments

Comments
 (0)