summaryrefslogtreecommitdiff
path: root/script-beta/core/diagnostics/undefined-env-child.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-12-25 17:27:01 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-12-25 17:27:01 +0800
commit856a4cb27430d6d578a1ee450e7ac4aa13a5f4f1 (patch)
tree356120ae3713e723e8dca5fdae6314b2d3b63676 /script-beta/core/diagnostics/undefined-env-child.lua
parent64aab1cc575552ce2ed494790d201d3e6f170065 (diff)
downloadlua-language-server-856a4cb27430d6d578a1ee450e7ac4aa13a5f4f1.zip
更新API
Diffstat (limited to 'script-beta/core/diagnostics/undefined-env-child.lua')
-rw-r--r--script-beta/core/diagnostics/undefined-env-child.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/script-beta/core/diagnostics/undefined-env-child.lua b/script-beta/core/diagnostics/undefined-env-child.lua
index df096cb8..a19abb63 100644
--- a/script-beta/core/diagnostics/undefined-env-child.lua
+++ b/script-beta/core/diagnostics/undefined-env-child.lua
@@ -14,9 +14,10 @@ return function (uri, callback)
if source.node.tag == '_ENV' then
return
end
- local setInENV = vm.eachRef(source, function (info)
- if info.mode == 'set' then
- return true
+ local setInENV
+ vm.eachRef(source, function (src)
+ if vm.isSet(src) then
+ setInENV = true
end
end)
if setInENV then