mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 02:05:45 +03:00
tidy
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
efad42439e
commit
3e548bbc94
1 changed files with 2 additions and 3 deletions
|
@ -121,10 +121,9 @@ export default class LeftPanel extends React.Component<IProps, IState> {
|
|||
}
|
||||
|
||||
const avatarUrlProp = `url(${avatarUrl})`;
|
||||
const existingValue = document.body.style.getPropertyValue("--avatar-url");
|
||||
if (!avatarUrl && existingValue) {
|
||||
if (!avatarUrl) {
|
||||
document.body.style.removeProperty("--avatar-url");
|
||||
} else if (avatarUrl && existingValue !== avatarUrlProp) {
|
||||
} else if (avatarUrl && document.body.style.getPropertyValue("--avatar-url") !== avatarUrlProp) {
|
||||
document.body.style.setProperty("--avatar-url", avatarUrlProp);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue