From 8a678353622cdcad53121f6e043ec4f57d41bc37 Mon Sep 17 00:00:00 2001 From: everestmcarthur <280397636+everestmcarthur@users.noreply.github.com> Date: Sun, 2 Aug 2026 09:45:54 -0400 Subject: [PATCH] ServerDrawer: fix boot-time crash from null fake quest asset fields --- plugins/server-drawer/src/patches/mobileQuestDock.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/server-drawer/src/patches/mobileQuestDock.ts b/plugins/server-drawer/src/patches/mobileQuestDock.ts index 88c0bc9..0cd5507 100644 --- a/plugins/server-drawer/src/patches/mobileQuestDock.ts +++ b/plugins/server-drawer/src/patches/mobileQuestDock.ts @@ -18,7 +18,15 @@ export function patchMobileQuestDock(cleanups: (() => void)[]): boolean { id: "server-drawer", config: { quest_content_type: 0, - assets: { questBarHeroVideo: null, questBarHero: null }, + // Empty strings, not null: confirmed live (crash stack trace) that Discord's real + // getQuestAsset -> resolveAsset -> buildUrl calls .startsWith() on whichever asset + // field it reads, uncaught by this repo's own getQuestAsset try/catch patch (meaning + // useQuestDockHeroAsset calls a reference that patch never actually reaches - likely + // an internal same-module call that bypasses the exports-object property it mutates). + // An empty string is falsy (same as null for any truthiness check upstream) but is a + // valid string .startsWith() can safely be called on, so it can't crash regardless of + // which exact code path reads it. + assets: { questBarHeroVideo: "", questBarHero: "" }, features: [], }, userStatus: { enrolledAt: "2099-01-01", claimedAt: null },