diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-09-23 18:56:25 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-09-23 18:56:25 +0800 |
commit | 7e9154e64d2a743903b1f9400bd254a039816ca0 (patch) | |
tree | 0c524b0ecff79f7a4a62d8922b00f7f6e348b9fb /server/src/core | |
parent | f063428d49f7dffe68518b8418a5d36abb6a7fc1 (diff) | |
download | lua-language-server-7e9154e64d2a743903b1f9400bd254a039816ca0.zip |
修正报错
Diffstat (limited to 'server/src/core')
-rw-r--r-- | server/src/core/diagnostics.lua | 2 |
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, |