Fix bug on Avatar.ts for custom theme avatar background color (#10598)
This commit is contained in:
parent
256c3591aa
commit
075c8c3d33
1 changed files with 1 additions and 1 deletions
|
@ -96,7 +96,7 @@ export function defaultAvatarUrlForString(s: string): string {
|
||||||
const colorIndex = total % defaultColors.length;
|
const colorIndex = total % defaultColors.length;
|
||||||
// overwritten color value in custom themes
|
// overwritten color value in custom themes
|
||||||
const cssVariable = `--avatar-background-colors_${colorIndex}`;
|
const cssVariable = `--avatar-background-colors_${colorIndex}`;
|
||||||
const cssValue = document.body.style.getPropertyValue(cssVariable);
|
const cssValue = getComputedStyle(document.body).getPropertyValue(cssVariable);
|
||||||
const color = cssValue || defaultColors[colorIndex];
|
const color = cssValue || defaultColors[colorIndex];
|
||||||
let dataUrl = colorToDataURLCache.get(color);
|
let dataUrl = colorToDataURLCache.get(color);
|
||||||
if (!dataUrl) {
|
if (!dataUrl) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue