diff --git a/macos/FluentUI/AvatarView/AvatarView.swift b/macos/FluentUI/AvatarView/AvatarView.swift index 9a9c5bb69..0247a4dcc 100644 --- a/macos/FluentUI/AvatarView/AvatarView.swift +++ b/macos/FluentUI/AvatarView/AvatarView.swift @@ -434,7 +434,7 @@ open class AvatarView: NSView { @available(*, deprecated, message: "Use getInitialsColorSetFromPrimaryText:secondaryText: instead") public static func getLegacyColor(for hashValue: Int) -> NSColor { let legacyAvatarBackgroundColors = AvatarView.legacyAvatarViewBackgroundColor - return legacyAvatarBackgroundColors[abs(hashValue) % legacyAvatarBackgroundColors.count] + return legacyAvatarBackgroundColors[abs(hashValue % legacyAvatarBackgroundColors.count)] } /// the font size in the initials view will be scaled to this fraction of the avatarSize passed in