diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-11-28 19:08:53 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-11-28 19:08:53 +0800 |
commit | 2125c831411ad865c93434fca7d9c929231c7031 (patch) | |
tree | 3b13e667641bc9e295eb2cbf61b186133c57002c /script-beta | |
parent | 03b947302aaed58d2c0abf90feac45a7a51d3385 (diff) | |
download | lua-language-server-2125c831411ad865c93434fca7d9c929231c7031.zip |
判空
Diffstat (limited to 'script-beta')
-rw-r--r-- | script-beta/vm/eachRef.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/script-beta/vm/eachRef.lua b/script-beta/vm/eachRef.lua index cc004c20..b636451b 100644 --- a/script-beta/vm/eachRef.lua +++ b/script-beta/vm/eachRef.lua @@ -309,7 +309,7 @@ local function ofGlobal(source, callback) for _, uri in ipairs(uris) do local ast = files.getAst(uri) local globals = vm.getGlobals(ast.ast) - if globals[key] then + if globals and globals[key] then for _, info in ipairs(globals[key]) do callback(info) if info.value then |