updated to allow empty children in an app, added console log of exceptions that were hidden before

This commit is contained in:
Tim Chamberlain
2022-09-07 11:30:28 -05:00
parent 4266ed1690
commit 00aaef03d8

View File

@ -159,10 +159,13 @@ export default function App()
} }
const childList: any[] = []; const childList: any[] = [];
if(app.children)
{
app.children.forEach((child: QAppTreeNode) => app.children.forEach((child: QAppTreeNode) =>
{ {
addAppToSideNavList(child, childList, path, depth + 1); addAppToSideNavList(child, childList, path, depth + 1);
}); });
}
if (childList.length === 0) if (childList.length === 0)
{ {
@ -209,11 +212,14 @@ export default function App()
{ {
const path = `${parentPath}/${app.name}`; const path = `${parentPath}/${app.name}`;
if (app.type === QAppNodeType.APP) if (app.type === QAppNodeType.APP)
{
if(app.children)
{ {
app.children.forEach((child: QAppTreeNode) => app.children.forEach((child: QAppTreeNode) =>
{ {
addAppToAppRoutesList(metaData, child, routeList, path, depth + 1); addAppToAppRoutesList(metaData, child, routeList, path, depth + 1);
}); });
}
routeList.push({ routeList.push({
name: `${app.label}`, name: `${app.label}`,
@ -342,6 +348,7 @@ export default function App()
} }
catch (e) catch (e)
{ {
console.log(e);
if (e.toString().indexOf("status code 401") !== -1) if (e.toString().indexOf("status code 401") !== -1)
{ {
logout(); logout();