From 3750bc297b35615510e9f3f0c3a850baf78a44dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 7 Jun 2021 20:19:13 +0800 Subject: update --- script/core/diagnostics/undefined-global.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'script/core/diagnostics/undefined-global.lua') diff --git a/script/core/diagnostics/undefined-global.lua b/script/core/diagnostics/undefined-global.lua index faf5f150..825b14f1 100644 --- a/script/core/diagnostics/undefined-global.lua +++ b/script/core/diagnostics/undefined-global.lua @@ -29,6 +29,10 @@ return function (uri, callback) if config.config.runtime.special[key] then return end + local node = src.node + if node.tag ~= '_ENV' then + return + end if #vm.getDefs(src) == 0 then local message = lang.script('DIAG_UNDEF_GLOBAL', key) if requireLike[key:lower()] then -- cgit v1.2.3