Skip to content

Commit

Permalink
Small correction to cooldown fix. (#743)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cidan authored Oct 29, 2022
1 parent fa05c40 commit 43748bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion widgets/ItemButton.lua
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ function buttonProto:UpdateCooldownCallback()
-- ID, and then fails again, leading to nil error spam if badID is not set.
-- I am unsure what is causing the second check to fail (GetParent), but this hack works around it.
-- Absolute worst case, some items may not have cooldowns displayed for the time being.
if self.bagID or (self:GetParent() ~= nil and self:GetParent():GetID() ~= nil) or not addon.isRetail then
if self.bagID or (self.GetParent ~= nil and self:GetParent() ~= nil and self:GetParent().GetID ~= nil and self:GetParent():GetID() ~= nil) or not addon.isRetail then
self:UpdateCooldown(self.texture)
end
end
Expand Down

0 comments on commit 43748bb

Please sign in to comment.