summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2024-03-30 21:18:30 +0000
committerubq323 <ubq323@ubq323.website>2024-03-30 21:18:30 +0000
commitb0bacc58a4bae7be2d47a0990eb0dd60e3666098 (patch)
treed4b2f2d375fca769343b5fa8ea301e33d0a83b99
parent0061cca2e76b22d0c39b035a30b04d59563ecee5 (diff)
more accurate check with .func
-rw-r--r--is_required.lua2
1 files changed, 1 insertions, 1 deletions
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