From 105217bd462b39f9e7cd149471042585d8a14e54 Mon Sep 17 00:00:00 2001 From: Rico040 <93081680+Rico040@users.noreply.github.com> Date: Tue, 14 May 2024 15:45:33 +1000 Subject: [PATCH] null check --- plugins/picture-links/src/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/picture-links/src/index.tsx b/plugins/picture-links/src/index.tsx index 89277f0..367c46a 100644 --- a/plugins/picture-links/src/index.tsx +++ b/plugins/picture-links/src/index.tsx @@ -78,7 +78,7 @@ const unpatchBanner = after("default", ProfileBanner, ([{ bannerSource }], res) }); var unpatchGuildIcon = after("default", GuildIcon, ([{ size, guild }], res) => { - if (size !== "XLARGE") return; + if (size !== "XLARGE" || guild?.icon == null) return; var ext = "png" if (guild?.icon.includes('a_')) { ext = "gif"; } const url = `https://cdn.discordapp.com/icons/${guild?.id}/${guild?.icon}.${ext}?size=4096`