Fix Emails page structuredClone error on load
CI / Launcher (Windows build check) (push) Failing after 11s
CI / Rust (fmt, clippy, tests) (push) Failing after 3m20s
CI / Web UIs (type-check + build) (launcher) (push) Successful in 2m55s
CI / Web UIs (type-check + build) (panel/web) (push) Successful in 2m59s
CI / Real installs (Mojang, Fabric, Quilt, Forge, NeoForge) (push) Failing after 9m11s
CI / Docker image builds (push) Canceled after 9m53s

Clone from the raw API response instead of the $state proxy.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VvKPBTwMK2SLDNUp5SxR7A
This commit is contained in:
Claude committed 2026-10-01 02:30:00 +00:00
1 parent deabea60ca
commit c0bf39071a
1 file changed
+4 -3
+4 -3
View File
@@ -26,9 +26,10 @@
async function load() {
try {
data = await get<Data>('/api/admin/email');
templates = structuredClone(data.templates);
if (!groupId && data.groups[0]) groupId = data.groups[0].id;
const d = await get<Data>('/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<Data>('/api/admin/email').then((d) => data && (data.log = d.log)).catch(() => {}), 5000); return () => clearInterval(i); });