summaryrefslogtreecommitdiff
path: root/script/core
diff options
context:
space:
mode:
Diffstat (limited to 'script/core')
-rw-r--r--script/core/document-symbol.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/script/core/document-symbol.lua b/script/core/document-symbol.lua
index 7392b337..f06e613c 100644
--- a/script/core/document-symbol.lua
+++ b/script/core/document-symbol.lua
@@ -76,8 +76,9 @@ local function buildTable(tbl)
if not field then
break
end
- if field.type == 'tablefield' then
- buf[i] = ('%s'):format(field.field[1])
+ if field.type == 'tablefield'
+ and field.field then
+ buf[#buf+1] = ('%s'):format(field.field[1])
end
end
return table.concat(buf, ', ')