From ce49447b6ec68635731a60e24a149529a2e737ac Mon Sep 17 00:00:00 2001 From: SCOPEDD Date: Wed, 30 Sep 2026 22:38:50 -0400 Subject: [PATCH] Fix Emails page structuredClone error on load (#5) Clone from the raw API response instead of the $state proxy. Claude-Session: https://claude.ai/code/session_01VvKPBTwMK2SLDNUp5SxR7A Co-authored-by: Claude --- panel/web/src/pages/Emails.svelte | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/panel/web/src/pages/Emails.svelte b/panel/web/src/pages/Emails.svelte index 00ce9d5..f233a18 100644 --- a/panel/web/src/pages/Emails.svelte +++ b/panel/web/src/pages/Emails.svelte @@ -26,9 +26,10 @@ async function load() { try { - data = await get('/api/admin/email'); - templates = structuredClone(data.templates); - if (!groupId && data.groups[0]) groupId = data.groups[0].id; + const d = await get('/api/admin/email'); + data = d; + templates = structuredClone(d.templates); + if (!groupId && d.groups[0]) groupId = d.groups[0].id; } catch (e) { toastError(e); } } onMount(() => { load(); const i = setInterval(() => get('/api/admin/email').then((d) => data && (data.log = d.log)).catch(() => {}), 5000); return () => clearInterval(i); });