summaryrefslogtreecommitdiff
path: root/script/vm/eachDef.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-12-22 10:13:19 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-12-22 10:13:19 +0800
commit7e1cef23d76df62e116412505a91115cf3573950 (patch)
tree7d96cdb4dfd4165f31e2eb56e15b51237a8cc006 /script/vm/eachDef.lua
parentb8527fc846c8d73296884e9a0836c83c35987fde (diff)
downloadlua-language-server-7e1cef23d76df62e116412505a91115cf3573950.zip
fix
Diffstat (limited to 'script/vm/eachDef.lua')
-rw-r--r--script/vm/eachDef.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/script/vm/eachDef.lua b/script/vm/eachDef.lua
index 7825d2b1..8d031f42 100644
--- a/script/vm/eachDef.lua
+++ b/script/vm/eachDef.lua
@@ -33,6 +33,9 @@ function vm.getDefs(source, deep)
deep = deep or -999
if guide.isGlobal(source) then
local key = guide.getKeyName(source)
+ if not key then
+ return {}
+ end
return vm.getGlobalSets(key)
else
local cache = vm.getCache('eachDef')[source]