Skip to content

Commit 56f62c6

Browse files
committed
fix guide.getParams
1 parent ef7157c commit 56f62c6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

script/parser/guide.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,12 +1313,18 @@ end
13131313
function m.getParams(source)
13141314
if source.type == 'call' then
13151315
local args = source.args
1316+
if not args then
1317+
return
1318+
end
13161319
assert(args.type == 'callargs', 'call.args type is\'t callargs')
13171320
return args
13181321
elseif source.type == 'callargs' then
13191322
return source
13201323
elseif source.type == 'function' then
13211324
local args = source.args
1325+
if not args then
1326+
return
1327+
end
13221328
assert(args.type == 'funcargs', 'function.args type is\'t callargs')
13231329
return args
13241330
end

0 commit comments

Comments
 (0)