diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-12 21:18:16 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-12 21:18:16 +0800 |
commit | 81bbbb5ae95c727cc8021a7b7f9fb2487c26281a (patch) | |
tree | 5cdff03be0da892c2bc3bbb99cdda75016582677 | |
parent | d76d63f7063376852ee9c8ea6795abde09149851 (diff) | |
download | lua-language-server-81bbbb5ae95c727cc8021a7b7f9fb2487c26281a.zip |
修正报错
-rw-r--r-- | server/src/matcher/hover.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/server/src/matcher/hover.lua b/server/src/matcher/hover.lua index d4d9d04b..7b4fd033 100644 --- a/server/src/matcher/hover.lua +++ b/server/src/matcher/hover.lua @@ -314,13 +314,15 @@ return function (vm, pos) return nil end + if not result.value then + return + end + local lib, fullKey, oo = findLib(result) if lib then local hover = getLibHover(lib, fullKey, oo) return hover end - if result.value then - return getValueHover(result, source) - end + return getValueHover(result, source) end |