From ff27193fac59c7a42671effd30dced46c250a4c1 Mon Sep 17 00:00:00 2001 From: Dede Fuji Abdul Date: Thu, 2 Nov 2023 10:36:42 +0700 Subject: [PATCH] Fix filter condition in convertRouteToMenu function --- src/utils/route.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/route.ts b/src/utils/route.ts index 124b767..a499546 100644 --- a/src/utils/route.ts +++ b/src/utils/route.ts @@ -37,7 +37,7 @@ const convertToDashedString = (input: string): string => { } export const convertRouteToMenu = (data: RouteRecordRaw[], basePath: string = '/home', iconIndex: number = 0): MenuItemModel[] => { - return data.filter((i) => i.path !== '').map((item) => { + return data.filter((i) => i.path !== '' && i.name != undefined).map((item) => { const convertedItem: MenuItemModel = { name: item.name?.toString() || '', path: `${basePath}/${item.path}`,