summaryrefslogtreecommitdiff
path: root/server/src/core/document_symbol.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-13 18:19:21 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-13 18:19:21 +0800
commit9ae9210c5250d3f53a358fd04ac5a947ac244963 (patch)
treea25fd4c2ed7f6a0bce8ad81bc19b90689cbfc785 /server/src/core/document_symbol.lua
parent68265491e70460966276752586a3e58c0781b0c8 (diff)
downloadlua-language-server-9ae9210c5250d3f53a358fd04ac5a947ac244963.zip
修正一些bug
Diffstat (limited to 'server/src/core/document_symbol.lua')
-rw-r--r--server/src/core/document_symbol.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/src/core/document_symbol.lua b/server/src/core/document_symbol.lua
index 7411b079..e22fd4db 100644
--- a/server/src/core/document_symbol.lua
+++ b/server/src/core/document_symbol.lua
@@ -65,7 +65,7 @@ local function buildLocal(vm, source, callback)
kind = SymbolKind.Variable
end
local valueSource = value:getSource()
- if valueSource.start == 0 or value.uri ~= vm.uri then
+ if not valueSource or valueSource.start == 0 or value.uri ~= vm.uri then
valueSource = source
end
local name = hvr.name
@@ -119,7 +119,7 @@ local function buildSet(vm, source, callback)
kind = SymbolKind.Property
end
local valueSource = value:getSource()
- if valueSource.start == 0 or value.uri ~= vm.uri then
+ if not valueSource or valueSource.start == 0 or value.uri ~= vm.uri then
valueSource = source
end
local name = hvr.name