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