From fe53e824366b7f035b22d3dfac1c886f01e7044c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Sun, 10 Nov 2019 17:58:48 +0800 Subject: =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=85=A8=E5=B1=80=E5=8F=98=E9=87=8F?= =?UTF-8?q?=E6=80=A7=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server-beta/src/core/diagnostics/undefined-env-child.lua | 5 ++--- server-beta/src/core/diagnostics/undefined-global.lua | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'server-beta/src/core') diff --git a/server-beta/src/core/diagnostics/undefined-env-child.lua b/server-beta/src/core/diagnostics/undefined-env-child.lua index 5815f9c3..4169a413 100644 --- a/server-beta/src/core/diagnostics/undefined-env-child.lua +++ b/server-beta/src/core/diagnostics/undefined-env-child.lua @@ -14,10 +14,9 @@ return function (uri, callback) if source.node.tag == '_ENV' then return end - local setInENV - searcher.eachRef(source, function (info) + local setInENV = searcher.eachRef(source, function (info) if info.mode == 'set' then - setInENV = true + return true end end) if setInENV then diff --git a/server-beta/src/core/diagnostics/undefined-global.lua b/server-beta/src/core/diagnostics/undefined-global.lua index 586a9955..b39803b8 100644 --- a/server-beta/src/core/diagnostics/undefined-global.lua +++ b/server-beta/src/core/diagnostics/undefined-global.lua @@ -18,10 +18,9 @@ return function (uri, callback) if hasSet[info.source] ~= nil then return end - local mark = false - searcher.eachRef(info.source, function (info) + local mark = searcher.eachRef(info.source, function (info) if info.mode == 'set' then - mark = true + return true end end) searcher.eachRef(info.source, function (info) -- cgit v1.2.3