Skip to content

Commit 85cb445

Browse files
committed
判空
1 parent 2dfb12a commit 85cb445

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

script/vm/global.lua

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -382,12 +382,14 @@ local compilerGlobalSwitch = util.switch()
382382
[1] = field.field[1],
383383
}
384384
elseif field.type == 'tableindex' then
385-
source._enums[#source._enums+1] = {
386-
type = 'doc.type.string',
387-
start = field.index.start,
388-
finish = field.index.finish,
389-
[1] = field.index[1],
390-
}
385+
if field.index then
386+
source._enums[#source._enums+1] = {
387+
type = 'doc.type.string',
388+
start = field.index.start,
389+
finish = field.index.finish,
390+
[1] = field.index[1],
391+
}
392+
end
391393
end
392394
end
393395
else

0 commit comments

Comments
 (0)