fix(init/cache): allow setting false cached value

Resolves #605.
This commit is contained in:
Linden
2024-07-01 12:17:50 +10:00
parent 6368c2c6fd
commit 45b9560a44

View File

@@ -185,7 +185,7 @@ local cache = setmetatable({ game = GetGameName(), resource = resourceName }, {
__call = function(self, key, func, timeout)
local value = rawget(self, key)
if not value then
if value == nil then
value = func()
rawset(self, key, value)