summaryrefslogtreecommitdiff
path: root/script/parser
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-02-22 12:06:27 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-02-22 12:06:27 +0800
commit5ab18375ca7f1b47fc589c30d419b23627e1a91f (patch)
tree2b5a0a5e07c44b6ec05b6d9a3650d66ae1fb1a22 /script/parser
parentf0003c7e75767e42b34d24be6ce24bf90ead04cf (diff)
downloadlua-language-server-5ab18375ca7f1b47fc589c30d419b23627e1a91f.zip
fix runtime errors
Diffstat (limited to 'script/parser')
-rw-r--r--script/parser/guide.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/script/parser/guide.lua b/script/parser/guide.lua
index b099dd9b..98dca211 100644
--- a/script/parser/guide.lua
+++ b/script/parser/guide.lua
@@ -2941,6 +2941,9 @@ function m.getRefCache(status, obj, mode)
if m.isGlobal(obj) then
obj = m.getKeyName(obj)
end
+ if not obj then
+ return {}
+ end
if not globalCache[mode] then
globalCache[mode] = {}
end