diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-03-20 11:18:48 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-03-20 11:18:48 +0800 |
commit | e24fe56cef46f073b94489a7cbf87973a44d8fb8 (patch) | |
tree | e8987ffb6c7744e210bc1cb40b91450519b2ce11 /server/src/core | |
parent | 1e8fd4412e151d2e02b3f3744f667e508cb20735 (diff) | |
download | lua-language-server-e24fe56cef46f073b94489a7cbf87973a44d8fb8.zip |
判个空
Diffstat (limited to 'server/src/core')
-rw-r--r-- | server/src/core/completion.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/server/src/core/completion.lua b/server/src/core/completion.lua index d02897c7..fcea333d 100644 --- a/server/src/core/completion.lua +++ b/server/src/core/completion.lua @@ -245,6 +245,9 @@ end local function searchCloseGlobal(vm, source, word, callback) local loc = source:bindLocal() + if not loc then + return + end local close = loc:close() -- 因为闭包的关系落在局部变量finish到close范围内的全局变量一定能访问到该局部变量 for _, src in ipairs(vm.sources) do |