summaryrefslogtreecommitdiff
path: root/script-beta/core/hover/name.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-12-09 15:00:29 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-12-09 15:00:29 +0800
commit9f621b6076181e577748dda3966bbc526586445d (patch)
tree05057166585d0f229030c44718312432ab163dc7 /script-beta/core/hover/name.lua
parent1e3726e3d3f6c84ce29e857181261b5ffb2d0da3 (diff)
downloadlua-language-server-9f621b6076181e577748dda3966bbc526586445d.zip
支持看lib的table
Diffstat (limited to 'script-beta/core/hover/name.lua')
-rw-r--r--script-beta/core/hover/name.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/script-beta/core/hover/name.lua b/script-beta/core/hover/name.lua
index 7b8cf449..917bf96d 100644
--- a/script-beta/core/hover/name.lua
+++ b/script-beta/core/hover/name.lua
@@ -29,9 +29,10 @@ end
local function asLibrary(source, caller)
local p
- if caller.type == 'method'
- or caller.type == 'getmethod'
- or caller.type == 'setmethod' then
+ if caller
+ and (caller.type == 'method'
+ or caller.type == 'getmethod'
+ or caller.type == 'setmethod') then
if source.parent then
for _, parent in ipairs(source.parent) do
if parent.type == 'object' then