Skip to content

Commit

Permalink
fix #2109: don't assume that all classes returned by UnitClass have a…
Browse files Browse the repository at this point in the history
… valid mapped color
  • Loading branch information
ascott18 committed Nov 18, 2023
1 parent 289ff51 commit dc370a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Components/Core/Common/PlayerNames.lua
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ function NAMES:UPDATE_MOUSEOVER_UNIT()

if class then
-- ClientActor type NPCs return nils for UnitClass.
self.ClassColoredNameCache[name] = self.ClassColors[class] .. name .. "|r"
local classColor = self.ClassColors[class]
self.ClassColoredNameCache[name] = classColor and (classColor .. name .. "|r") or name
end
end

Expand Down

0 comments on commit dc370a2

Please sign in to comment.