From c35416ec13fbc70fb7e1b91307ef65ca0f22a2a9 Mon Sep 17 00:00:00 2001 From: Aine Date: Mon, 9 Dec 2024 11:42:05 +0200 Subject: [PATCH] add safeguard for custom menu --- src/components/AdminLayout.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/AdminLayout.tsx b/src/components/AdminLayout.tsx index 398162b..30eaaa0 100644 --- a/src/components/AdminLayout.tsx +++ b/src/components/AdminLayout.tsx @@ -61,7 +61,7 @@ const AdminMenu = (props) => { return ( - {menu.map((item, index) => { + {menu && menu.map((item, index) => { const { url, icon, label } = item; const IconComponent = Icons[icon] as React.ComponentType | undefined;