Fix avatar background when bgKey undefined

This commit is contained in:
Robert Long 2022-03-01 11:37:45 -08:00
parent 369b59a203
commit 9900d661be

View file

@ -34,7 +34,7 @@ export function Avatar({
}) {
const backgroundColor = useMemo(() => {
const index = hashStringToArrIndex(
bgKey || fallback || src,
bgKey || fallback || src || "",
backgroundColors.length
);
return backgroundColors[index];