Skip to content

Commit

Permalink
fix(init/cache): allow setting false cached value
Browse files Browse the repository at this point in the history
Resolves #605.
  • Loading branch information
thelindat committed Jul 1, 2024
1 parent 6368c2c commit 45b9560
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 45b9560

Please sign in to comment.