From 30435069b3d620f7af65cd8e73cbd841d5febe32 Mon Sep 17 00:00:00 2001 From: MathMan05 Date: Tue, 3 Mar 2026 14:49:05 -0600 Subject: [PATCH] fixes --- src/webpage/embed.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/webpage/embed.ts b/src/webpage/embed.ts index 77cc5e6..8ccd03d 100644 --- a/src/webpage/embed.ts +++ b/src/webpage/embed.ts @@ -100,8 +100,8 @@ class Embed { if (this.json.author.icon_url) { const img = document.createElement("img"); img.classList.add("authorEmbedImg"); - this.localuser.refreshIfNeeded(this.json.author.icon_url).then(url => { - this.json.author.icon_url = url; + this.localuser.refreshIfNeeded(this.json.author.icon_url).then((url) => { + if (this.json.author) this.json.author.icon_url = url; img.src = url; }); authorline.append(img); @@ -152,8 +152,8 @@ class Embed { const footer = document.createElement("div"); if (this.json?.footer?.icon_url) { const img = document.createElement("img"); - this.localuser.refreshIfNeeded(this.json.footer.icon_url).then(url => { - this.json.footer.icon_url = url; + this.localuser.refreshIfNeeded(this.json.footer.icon_url).then((url) => { + if (this.json.footer) this.json.footer.icon_url = url; img.src = url; }); img.classList.add("embedicon");