From 000d105983c143e2f70ad955d9e07c245fcab537 Mon Sep 17 00:00:00 2001 From: Luke Vella Date: Mon, 27 Jun 2022 20:44:42 +0100 Subject: [PATCH] Fix user avatar color order (#209) --- src/components/poll/user-avatar.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/poll/user-avatar.tsx b/src/components/poll/user-avatar.tsx index 55a78a3e4..5368b18c0 100644 --- a/src/components/poll/user-avatar.tsx +++ b/src/components/poll/user-avatar.tsx @@ -46,9 +46,7 @@ export const UserAvatarProvider: React.VoidFunctionComponent<{ "": defaultColor, }; for (let i = 0; i < names.length; i++) { - const lastIndex = names.length - 1; - // start from the end since the names is "most recent" first. - const name = names[lastIndex - i].trim().toLowerCase(); + const name = names[i].trim().toLowerCase(); const color = colors[(seedValue + i) % colors.length]; res[name] = color; }