summaryrefslogtreecommitdiff
path: root/script-beta/core
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-11-27 17:32:15 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-11-27 17:32:15 +0800
commitaeeb7d9a52ca429bfd4db41a1e675261d285665c (patch)
treeb6a4b09db417eb9aa1b9405cd508af8d3c484aa2 /script-beta/core
parent4b4b29fae0fee6cf109be4400104d23b191d24fd (diff)
downloadlua-language-server-aeeb7d9a52ca429bfd4db41a1e675261d285665c.zip
修正报错
Diffstat (limited to 'script-beta/core')
-rw-r--r--script-beta/core/hover/label.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/script-beta/core/hover/label.lua b/script-beta/core/hover/label.lua
index 72ce60f4..a424e453 100644
--- a/script-beta/core/hover/label.lua
+++ b/script-beta/core/hover/label.lua
@@ -53,12 +53,12 @@ local function isGlobalField(source)
or source.type == 'setmethod'
or source.type == 'getmethod'
or source.type == 'tablefield' then
- local node = source.node
- if node.type == 'setglobal'
- or node.type == 'getglobal' then
+ local parent = source.parent
+ if parent.type == 'setglobal'
+ or parent.type == 'getglobal' then
return true
end
- return isGlobalField(node)
+ return isGlobalField(parent)
else
return false
end