cooldown: use cached parent variable

This commit is contained in:
shagu
2020-09-20 20:09:29 +02:00
parent 5c403d8cc1
commit 6bfd09d0d6
+2 -2
View File
@@ -12,8 +12,8 @@ pfUI:RegisterModule("cooldown", "vanilla:tbc", function ()
if not parent then this:Hide() end
-- avoid to set cooldowns on invalid frames
if this:GetParent() and this:GetParent():GetName() and _G[this:GetParent():GetName() .. "Cooldown"] then
if not _G[this:GetParent():GetName() .. "Cooldown"]:IsShown() then
if parent and parent:GetName() and _G[parent:GetName() .. "Cooldown"] then
if not _G[parent:GetName() .. "Cooldown"]:IsShown() then
this:Hide()
end
end