summaryrefslogtreecommitdiff
path: root/script-beta/vm/getClass.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-01-23 16:09:48 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-01-23 16:09:48 +0800
commit0a5fbd8a8889599b2216c674819569eda754ef05 (patch)
treee3900c5ea88e822bbac6e0c137f0c3231c07ada8 /script-beta/vm/getClass.lua
parent5597c4449838ad4bfae4c2791c0778e9b7fd08ab (diff)
downloadlua-language-server-0a5fbd8a8889599b2216c674819569eda754ef05.zip
修正报错
Diffstat (limited to 'script-beta/vm/getClass.lua')
-rw-r--r--script-beta/vm/getClass.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/script-beta/vm/getClass.lua b/script-beta/vm/getClass.lua
index c4bde74a..4d7ef69c 100644
--- a/script-beta/vm/getClass.lua
+++ b/script-beta/vm/getClass.lua
@@ -6,6 +6,9 @@ local function getClass(source, classes, deep)
end
vm.eachField(source, function (src)
local key = vm.getKeyName(src)
+ if not key then
+ return
+ end
local lkey = key:lower()
if lkey == 's|type'
or lkey == 's|__name'
@@ -19,6 +22,9 @@ local function getClass(source, classes, deep)
if source.value then
vm.eachField(source.value, function (src)
local key = vm.getKeyName(src)
+ if not key then
+ return
+ end
local lkey = key:lower()
if lkey == 's|type'
or lkey == 's|__name'