summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-28 17:27:54 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-28 17:27:54 +0800
commit7073207a8de4491c598b56d19497f78935027022 (patch)
tree48f09bf927f1da7851a976d5467e094446144667 /server
parentfd5fba2c6aed7eff07102f62c7d760e219768b5f (diff)
downloadlua-language-server-7073207a8de4491c598b56d19497f78935027022.zip
修正报错
Diffstat (limited to 'server')
-rw-r--r--server/src/core/document_symbol.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/src/core/document_symbol.lua b/server/src/core/document_symbol.lua
index ac81277c..7e978767 100644
--- a/server/src/core/document_symbol.lua
+++ b/server/src/core/document_symbol.lua
@@ -167,6 +167,9 @@ local function buildFunction(vm, source, used, callback)
end
local name = getName(source.name)
local func = value:getFunction()
+ if not func then
+ return
+ end
local hvr = hoverFunction(name, func, func:getObject())
if not hvr then
return