summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-25 15:29:22 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-25 15:29:22 +0800
commit024414366e1dbdfa804d0f71fac53c0246490b4b (patch)
treede39efa9855c3109cb62d7f1c51546fbd5f59a38
parentf2ae07bdf03492462f4619bb4e7ae238da7f8a5b (diff)
downloadlua-language-server-024414366e1dbdfa804d0f71fac53c0246490b4b.zip
修正报错
-rw-r--r--server/src/matcher/hover.lua2
-rw-r--r--server/src/matcher/signature.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/server/src/matcher/hover.lua b/server/src/matcher/hover.lua
index a6a83ed5..e34bec69 100644
--- a/server/src/matcher/hover.lua
+++ b/server/src/matcher/hover.lua
@@ -401,7 +401,7 @@ return function (result, source, lsp, select)
return getStringHover(result, lsp)
end
- if result.type ~= 'local' or result.type ~= 'field' then
+ if result.type ~= 'local' and result.type ~= 'field' then
return
end
diff --git a/server/src/matcher/signature.lua b/server/src/matcher/signature.lua
index c62117fc..dc6af15e 100644
--- a/server/src/matcher/signature.lua
+++ b/server/src/matcher/signature.lua
@@ -53,7 +53,7 @@ return function (vm, pos)
local hovers = {}
for _, call in ipairs(calls) do
local hvr = hover(call.var, call.source, nil, call.select)
- if hvr.argLabel then
+ if hvr and hvr.argLabel then
hovers[#hovers+1] = hvr
end
end