From 8d979a9305915e7f736b1d15d454a3dead6a7d16 Mon Sep 17 00:00:00 2001 From: Giancarmine Salucci Date: Tue, 12 May 2026 22:50:53 +0200 Subject: [PATCH] fix(ui): destructure {item} from POST /api/queue response submitUrl() was using the full {duplicate, item} response object as the queue item, causing 'Cannot read properties of undefined (reading length)' crash when rendering phases in RecipeSheet/ TimelineRow. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/routes/+page.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 4644b69..62419c1 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -130,7 +130,7 @@ const err = await response.json(); throw new Error(err.message || 'Failed to enqueue URL'); } - const queueItem = await response.json(); + const { item: queueItem } = await response.json(); // Item will arrive via SSE, but add immediately for UX items = [queueItem, ...items]; screen = 'home';