625925f - Remove safeties, possible tainting
[wowui.git] / RaidFrameCustomization / UpdateNameHook.lua
index f75dacb..cd17ca1 100644 (file)
@@ -1,7 +1,9 @@
 local UnitName = UnitName;
 
 hooksecurefunc("CompactUnitFrame_UpdateName", function(frame)
-    if frame and not frame:IsForbidden() and frame:GetName():match("^CompactRaidFrame%d") then
+    -- allowClassColorsForNPCs only in regular raid frames,
+    -- match only to them
+    if frame.optionTable.allowClassColorsForNPCs ~= nil then
         local name, _;
         name, _ = UnitName(frame.unit);
         if name then