From b0bacc58a4bae7be2d47a0990eb0dd60e3666098 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Sat, 30 Mar 2024 21:18:30 +0000 Subject: more accurate check with .func --- is_required.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/is_required.lua b/is_required.lua index 40b3e88..953b673 100644 --- a/is_required.lua +++ b/is_required.lua @@ -5,7 +5,7 @@ local function is_required() local x = debug.getinfo(n) if x == nil then break end n = n + 1 - if x.name == 'require' then + if x.func == _G.require then res = true break -- cgit v1.2.3