From 493912dfd2eb7d570ecf1041d1a8c69350a65caf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Fri, 9 Oct 2020 16:49:47 +0800 Subject: =?UTF-8?q?=E8=BF=98=E6=98=AF=E8=A6=81=E5=88=A4=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script-beta/core/document-symbol.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'script-beta') diff --git a/script-beta/core/document-symbol.lua b/script-beta/core/document-symbol.lua index 6f3e788f..dd58fe82 100644 --- a/script-beta/core/document-symbol.lua +++ b/script-beta/core/document-symbol.lua @@ -94,11 +94,17 @@ local function buildValue(source, symbols) sRange = { source.start, source.finish } kind = skind.Class elseif source.type == 'tablefield' then + if not source.field then + return + end details[1] = 'field' range = { source.field.start, source.field.finish } sRange = { source.field.start, source.field.finish } kind = skind.Property elseif source.type == 'setfield' then + if not source.field then + return + end details[1] = 'field' range = { source.field.start, source.field.finish } sRange = { source.field.start, source.field.finish } -- cgit v1.2.3