[fix](trx-frontend-http): guard scheduleSpectrumDraw from TDZ during init
scheduleSpectrumDraw references a let-bound variable that hasn't been initialized yet when setTheme runs at startup. Wrap in try/catch so the early call is silently skipped. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
@@ -632,7 +632,7 @@ function setTheme(theme) {
|
||||
}
|
||||
// Invalidate cached bookmark chip colours so they pick up the new theme palette.
|
||||
if (typeof bmRevision !== "undefined") bmRevision++;
|
||||
if (typeof scheduleSpectrumDraw === "function") scheduleSpectrumDraw();
|
||||
try { if (typeof scheduleSpectrumDraw === "function") scheduleSpectrumDraw(); } catch (_) {}
|
||||
}
|
||||
|
||||
// ── Style / palette system ────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user