summaryrefslogtreecommitdiff
path: root/server/src/core
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-09-23 18:56:25 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-09-23 18:56:25 +0800
commit7e9154e64d2a743903b1f9400bd254a039816ca0 (patch)
tree0c524b0ecff79f7a4a62d8922b00f7f6e348b9fb /server/src/core
parentf063428d49f7dffe68518b8418a5d36abb6a7fc1 (diff)
downloadlua-language-server-7e9154e64d2a743903b1f9400bd254a039816ca0.zip
修正报错
Diffstat (limited to 'server/src/core')
-rw-r--r--server/src/core/diagnostics.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/src/core/diagnostics.lua b/server/src/core/diagnostics.lua
index 0e0d85ba..e5fd0ba5 100644
--- a/server/src/core/diagnostics.lua
+++ b/server/src/core/diagnostics.lua
@@ -563,7 +563,7 @@ function mt:searchGlobalInNilEnv(callback)
return
end
local parentSource = source:get 'parent' :getSource()
- if parentSource.type == 'nil' then
+ if parentSource and parentSource.type == 'nil' then
callback(source.start, source.finish, {
{
start = parentSource.start,