summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9218422)
raw | patch | inline | side by side (parent: 9218422)
author | Eric Wertz <ericwertz@Erics-MacBook-Pro.local> | |
Sun, 1 Jun 2025 04:18:11 +0000 (00:18 -0400) | ||
committer | Eric Wertz <ericwertz@Erics-MacBook-Pro.local> | |
Sun, 1 Jun 2025 04:18:11 +0000 (00:18 -0400) |
frontend/components/ListContext.tsx | patch | blob | history |
index 54b0c55f9b689ee3989d25396f440b4b7d320d2c..79a65eb49f95e9cacf9f4b165aeefca97103763d 100644 (file)
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);