Skip to content

Commit 0fe1376

Browse files
authored
Handle user image not found (#2035)
If there is no image then fallback to an empty string
1 parent c5ef8a1 commit 0fe1376

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

website/src/lib/leaderboard_utilities.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export const updateUsersProfilePictures = async <T extends { auth_method: string
2020
return entires.map((entry, idx) => ({
2121
...entry,
2222
// NOTE: findMany will return the values unsorted, which is why we have to 'find' here
23-
image: items.find((i) => i.id === frontendUserIds[idx]).image,
23+
// TODO: Check why there is no image for a better fix
24+
image: items.find((i) => i.id === frontendUserIds[idx])?.image || "",
2425
}));
2526
};

0 commit comments

Comments
 (0)