Fix avatar background when bgKey undefined
This commit is contained in:
parent
369b59a203
commit
9900d661be
1 changed files with 1 additions and 1 deletions
|
@ -34,7 +34,7 @@ export function Avatar({
|
||||||
}) {
|
}) {
|
||||||
const backgroundColor = useMemo(() => {
|
const backgroundColor = useMemo(() => {
|
||||||
const index = hashStringToArrIndex(
|
const index = hashStringToArrIndex(
|
||||||
bgKey || fallback || src,
|
bgKey || fallback || src || "",
|
||||||
backgroundColors.length
|
backgroundColors.length
|
||||||
);
|
);
|
||||||
return backgroundColors[index];
|
return backgroundColors[index];
|
||||||
|
|
Loading…
Add table
Reference in a new issue