summaryrefslogtreecommitdiff
path: root/script-beta/vm/getClass.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-09-08 18:54:29 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-09-08 18:54:29 +0800
commit7eddd5d42c40959390c052683cf17a3c4cbd5151 (patch)
tree7856f67001d58317e8f34c03a051c9fcb11a97c3 /script-beta/vm/getClass.lua
parentfb294036fe0d80c871d31374e882e64f582d0719 (diff)
downloadlua-language-server-7eddd5d42c40959390c052683cf17a3c4cbd5151.zip
修正一些bug
Diffstat (limited to 'script-beta/vm/getClass.lua')
-rw-r--r--script-beta/vm/getClass.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/script-beta/vm/getClass.lua b/script-beta/vm/getClass.lua
index c8eb2080..03cde93a 100644
--- a/script-beta/vm/getClass.lua
+++ b/script-beta/vm/getClass.lua
@@ -4,7 +4,11 @@ local guide = require 'parser.guide'
local function getClass(source, classes, deep)
local lib = vm.getLibrary(source)
if lib then
- classes[#classes+1] = lib.name
+ if lib.value.type == 'table' then
+ classes[#classes+1] = lib.value.name
+ else
+ classes[#classes+1] = lib.value.type
+ end
return
end
if deep > 3 then