diff --git a/elements/portrait.lua b/elements/portrait.lua index 1a6f9bf9..538bd65f 100644 --- a/elements/portrait.lua +++ b/elements/portrait.lua @@ -71,7 +71,13 @@ local function Update(self, event, unit) element:SetUnit(unit) end else - local class = element.showClass and UnitClassBase(unit) + local class, _ + if(element.showClass) then + -- BUG: UnitClassBase can't be trusted + -- https://github.com/Stanzilla/WoWUIBugs/issues/621 + _, class = UnitClass(unit) + end + if(class) then element:SetAtlas('classicon-' .. class) else