Always set globals in __newindex (#13131)

This commit is contained in:
Jude Melton-Houghton 2023-01-09 15:00:49 -05:00 committed by GitHub
parent d0b6f217ae
commit d69cb4fb5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -14,6 +14,7 @@ local declared = {}
local warned = {}
function meta:__newindex(name, value)
rawset(self, name, value)
if declared[name] then
return
end
@ -25,7 +26,6 @@ function meta:__newindex(name, value)
:format(name, desc))
warned[warn_key] = true
end
rawset(self, name, value)
declared[name] = true
end