summaryrefslogtreecommitdiff
path: root/script/vm/global.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/vm/global.lua')
-rw-r--r--script/vm/global.lua14
1 files changed, 8 insertions, 6 deletions
diff --git a/script/vm/global.lua b/script/vm/global.lua
index aa987cf4..ed2b4802 100644
--- a/script/vm/global.lua
+++ b/script/vm/global.lua
@@ -382,12 +382,14 @@ local compilerGlobalSwitch = util.switch()
[1] = field.field[1],
}
elseif field.type == 'tableindex' then
- source._enums[#source._enums+1] = {
- type = 'doc.type.string',
- start = field.index.start,
- finish = field.index.finish,
- [1] = field.index[1],
- }
+ if field.index then
+ source._enums[#source._enums+1] = {
+ type = 'doc.type.string',
+ start = field.index.start,
+ finish = field.index.finish,
+ [1] = field.index[1],
+ }
+ end
end
end
else