Fix background-image: url(null) for backdrop filter
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
dce047e25c
commit
efad42439e
2 changed files with 6 additions and 2 deletions
|
@ -119,8 +119,12 @@ export default class LeftPanel extends React.Component<IProps, IState> {
|
|||
if (settingBgMxc) {
|
||||
avatarUrl = MatrixClientPeg.get().mxcUrlToHttp(settingBgMxc, avatarSize, avatarSize);
|
||||
}
|
||||
|
||||
const avatarUrlProp = `url(${avatarUrl})`;
|
||||
if (document.body.style.getPropertyValue("--avatar-url") !== avatarUrlProp) {
|
||||
const existingValue = document.body.style.getPropertyValue("--avatar-url");
|
||||
if (!avatarUrl && existingValue) {
|
||||
document.body.style.removeProperty("--avatar-url");
|
||||
} else if (avatarUrl && existingValue !== avatarUrlProp) {
|
||||
document.body.style.setProperty("--avatar-url", avatarUrlProp);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue