summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-05-05 13:07:22 +0800
committersumneko <sumneko@hotmail.com>2019-05-05 13:07:22 +0800
commitc85e32e8e124ab70b1286349469fb838e06b06c9 (patch)
tree60435cc8a0e1dff353870c270241ea99a52b191d /server
parent34c76f50668f21c953deb9fd8257739f19b633c3 (diff)
downloadlua-language-server-c85e32e8e124ab70b1286349469fb838e06b06c9.zip
修正有时文件符号失败的bug
Diffstat (limited to 'server')
-rw-r--r--server/src/core/document_symbol.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/server/src/core/document_symbol.lua b/server/src/core/document_symbol.lua
index 48e01332..3c349246 100644
--- a/server/src/core/document_symbol.lua
+++ b/server/src/core/document_symbol.lua
@@ -141,6 +141,9 @@ local function buildLocalFunction(vm, source, used, callback)
return
end
local name = getName(source.name)
+ if name == '' then
+ return
+ end
local hvr = hoverFunction(name, value:getFunction())
if not hvr then
return
@@ -166,6 +169,9 @@ local function buildFunction(vm, source, used, callback)
return
end
local name = getName(source.name)
+ if name == '' then
+ return
+ end
local func = value:getFunction()
if not func then
return