Skip to content

Commit

Permalink
Fix clients without avatar having an css url with literal value "null"
Browse files Browse the repository at this point in the history
  • Loading branch information
ZockerAxel committed Aug 23, 2024
1 parent dc31508 commit d58c5d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/viewer/ClientView.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export default class ClientView extends View {
this.#element.classList.add("client");
this.#element.classList.toggle("regular_client", this.#client.getType() === 0);
this.#element.classList.toggle("has_avatar", this.#client.getAvatarUrl() !== null);
this.#element.style.setProperty("--avatar", `url("${this.#client.getAvatarUrl()}")`);
if(this.#client.getAvatarUrl() !== null) this.#element.style.setProperty("--avatar", `url("${this.#client.getAvatarUrl()}")`);
if(this.#client.isLocalClient()) this.#element.classList.add("self");

for(const status of CLIENT_STATUSES) {
Expand Down

0 comments on commit d58c5d2

Please sign in to comment.