From 00aaef03d8a6ce69f0239380544c072c8a264acb Mon Sep 17 00:00:00 2001 From: Tim Chamberlain Date: Wed, 7 Sep 2022 11:30:28 -0500 Subject: [PATCH] updated to allow empty children in an app, added console log of exceptions that were hidden before --- src/App.tsx | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index f08acce..ad2647a 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -159,10 +159,13 @@ export default function App() } const childList: any[] = []; - app.children.forEach((child: QAppTreeNode) => + if(app.children) { - addAppToSideNavList(child, childList, path, depth + 1); - }); + app.children.forEach((child: QAppTreeNode) => + { + addAppToSideNavList(child, childList, path, depth + 1); + }); + } if (childList.length === 0) { @@ -210,10 +213,13 @@ export default function App() const path = `${parentPath}/${app.name}`; if (app.type === QAppNodeType.APP) { - app.children.forEach((child: QAppTreeNode) => + if(app.children) { - addAppToAppRoutesList(metaData, child, routeList, path, depth + 1); - }); + app.children.forEach((child: QAppTreeNode) => + { + addAppToAppRoutesList(metaData, child, routeList, path, depth + 1); + }); + } routeList.push({ name: `${app.label}`, @@ -342,6 +348,7 @@ export default function App() } catch (e) { + console.log(e); if (e.toString().indexOf("status code 401") !== -1) { logout();