Skip to content

Commit

Permalink
Fixed potential error when caching currencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Breeni committed Sep 16, 2024
1 parent 3a4c82f commit c4b17a0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions States/Currency.lua
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,10 @@ Internal.RegisterEvent("PLAYER_ENTERING_WORLD", function()
local _, id = strsplit(":", string.match(link, "currency:[:%d]+"))
id = tonumber(id)

local data = BtWTodoCache.currencies[id] or {}
BtWTodoCache.currencies[id] = data
if id then
local data = BtWTodoCache.currencies[id] or {}
BtWTodoCache.currencies[id] = data
end
end
end

Expand Down

0 comments on commit c4b17a0

Please sign in to comment.