Skip to content

Commit

Permalink
Fix issue with nonexistent items in a queue
Browse files Browse the repository at this point in the history
  • Loading branch information
Anonomit committed Dec 8, 2023
1 parent d1f3651 commit eafe781
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ItemCache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,14 @@ function ItemDB:InitQueryCallbacks()
yieldThreshold = yieldThreshold - 1
if item:Exists() then
queue:add(item)
else
private.itemsRemaining = private.itemsRemaining - 1
if private.itemsRemaining == 0 then
if private.callback then
private.callback(unpack(private))
end
tblremove(self.loadCallbacks, i)
end
end
end
end
Expand Down

0 comments on commit eafe781

Please sign in to comment.