diff --git a/builtin/common/strict.lua b/builtin/common/strict.lua index 05ceadf7..23ba3d72 100644 --- a/builtin/common/strict.lua +++ b/builtin/common/strict.lua @@ -5,6 +5,9 @@ local WARN_INIT = false function core.global_exists(name) + if type(name) ~= "string" then + error("core.global_exists: " .. tostring(name) .. " is not a string") + end return rawget(_G, name) ~= nil end