From 9900d661be37ee717acaebe9b2ab1c8db0dd20f1 Mon Sep 17 00:00:00 2001 From: Robert Long Date: Tue, 1 Mar 2022 11:37:45 -0800 Subject: [PATCH] Fix avatar background when bgKey undefined --- src/Avatar.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Avatar.jsx b/src/Avatar.jsx index 85b6255..fcfc333 100644 --- a/src/Avatar.jsx +++ b/src/Avatar.jsx @@ -34,7 +34,7 @@ export function Avatar({ }) { const backgroundColor = useMemo(() => { const index = hashStringToArrIndex( - bgKey || fallback || src, + bgKey || fallback || src || "", backgroundColors.length ); return backgroundColors[index];