Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 3e548bb

Browse files
committed
tidy
Signed-off-by: Michael Telatynski <[email protected]>
1 parent efad424 commit 3e548bb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/components/structures/LeftPanel.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,9 @@ export default class LeftPanel extends React.Component<IProps, IState> {
121121
}
122122

123123
const avatarUrlProp = `url(${avatarUrl})`;
124-
const existingValue = document.body.style.getPropertyValue("--avatar-url");
125-
if (!avatarUrl && existingValue) {
124+
if (!avatarUrl) {
126125
document.body.style.removeProperty("--avatar-url");
127-
} else if (avatarUrl && existingValue !== avatarUrlProp) {
126+
} else if (avatarUrl && document.body.style.getPropertyValue("--avatar-url") !== avatarUrlProp) {
128127
document.body.style.setProperty("--avatar-url", avatarUrlProp);
129128
}
130129
};

0 commit comments

Comments
 (0)