From 9ed24d93230e6f2b89575d0a37b5e1ef19739493 Mon Sep 17 00:00:00 2001 From: Sanyam Jain Date: Fri, 26 Jan 2024 15:54:14 +0530 Subject: [PATCH] fixed error --- src/components/DashboardComponents/ShowItems/ShowItems.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/DashboardComponents/ShowItems/ShowItems.jsx b/src/components/DashboardComponents/ShowItems/ShowItems.jsx index c640779..febca34 100644 --- a/src/components/DashboardComponents/ShowItems/ShowItems.jsx +++ b/src/components/DashboardComponents/ShowItems/ShowItems.jsx @@ -29,12 +29,12 @@ const ShowItems = ({ title, items, type }) => { }; // Sort items by name in ascending order - const sortedItems = items.slice().sort((a, b) => a.data?.name.localeCompare(b.data?.name)); + const sortedItems = items?.slice().sort((a, b) => a.data?.name.localeCompare(b.data?.name)); return (
- {sortedItems.map((item, index) => ( + {sortedItems?.map((item, index) => (