summaryrefslogtreecommitdiff
path: root/script/parser
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-12-16 16:57:53 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-12-16 16:57:53 +0800
commit0cf988c135cb2a94cda80cfbca187a3b58b2eee6 (patch)
tree65591516028c622ccabe028b74a383f1765796f9 /script/parser
parent143424062920433c7e3994248dfc5d935c337de0 (diff)
downloadlua-language-server-0cf988c135cb2a94cda80cfbca187a3b58b2eee6.zip
#306
Diffstat (limited to 'script/parser')
-rw-r--r--script/parser/guide.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/script/parser/guide.lua b/script/parser/guide.lua
index 01a1f2ba..ba858eaf 100644
--- a/script/parser/guide.lua
+++ b/script/parser/guide.lua
@@ -2320,7 +2320,7 @@ function m.pushResult(status, mode, ref, simple)
results[#results+1] = ref
elseif ref.type == 'getindex' then
-- do not trust `t[1]`
- if ref.index.type == 'string' then
+ if ref.index and ref.index.type == 'string' then
results[#results+1] = ref
end
elseif ref.type == 'setglobal'