From: Eric Wertz Date: Sun, 1 Jun 2025 04:18:11 +0000 (-0400) Subject: Fixing empty list initial content X-Git-Url: https://ericdwertz.com/git/?a=commitdiff_plain;h=172a016ca3d83291605188adb20b68275e38382b;p=listv4.git Fixing empty list initial content --- diff --git a/frontend/components/ListContext.tsx b/frontend/components/ListContext.tsx index 54b0c55..79a65eb 100644 --- a/frontend/components/ListContext.tsx +++ b/frontend/components/ListContext.tsx @@ -23,7 +23,7 @@ export const ListContext = () => { const fetchItems = async () => { try { const response = await fetchData('/list/fetch') as { data: ItemProps[] }; - if (response?.data) { + if (response?.data && response.data.length > 0) { // Ensure all items have proper order values const itemsWithOrders = ensureItemOrders(response.data); setItems(itemsWithOrders);