fix(ui): destructure {item} from POST /api/queue response
All checks were successful
Build & Push Docker Image / test-and-build (push) Successful in 1m1s
All checks were successful
Build & Push Docker Image / test-and-build (push) Successful in 1m1s
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>
This commit is contained in:
@@ -130,7 +130,7 @@
|
|||||||
const err = await response.json();
|
const err = await response.json();
|
||||||
throw new Error(err.message || 'Failed to enqueue URL');
|
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
|
// Item will arrive via SSE, but add immediately for UX
|
||||||
items = [queueItem, ...items];
|
items = [queueItem, ...items];
|
||||||
screen = 'home';
|
screen = 'home';
|
||||||
|
|||||||
Reference in New Issue
Block a user