ets-fe-ng-sdk 20.3.2 → 20.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1345,30 +1345,6 @@ var EVFunctions;
1345
1345
  */
1346
1346
  function extendRoute2(route, indexPage) {
1347
1347
  const routes = [
1348
- indexPage?.redirectToIndex
1349
- ? { path: '', redirectTo: 'index', pathMatch: 'full' }
1350
- : {
1351
- path: '',
1352
- data: {
1353
- ...route.data,
1354
- title: indexPage?.hideTitle ? undefined : indexPage?.title || route.data?.title,
1355
- type: EPageType.indexPage,
1356
- },
1357
- component: indexPage?.component,
1358
- loadChildren: indexPage?.lazyModule,
1359
- loadComponent: indexPage?.lazyComponent,
1360
- },
1361
- {
1362
- path: 'index',
1363
- data: {
1364
- ...route.data,
1365
- title: route.data?.title,
1366
- type: EPageType.indexPage,
1367
- },
1368
- component: indexPage?.component,
1369
- loadChildren: indexPage?.lazyModule,
1370
- loadComponent: indexPage?.lazyComponent,
1371
- },
1372
1348
  {
1373
1349
  ...route,
1374
1350
  path: 'clone',
@@ -1406,8 +1382,27 @@ var EVFunctions;
1406
1382
  },
1407
1383
  },
1408
1384
  ];
1409
- if (!indexPage || !(Object.keys(indexPage).length > 0)) {
1410
- routes.splice(0, 2);
1385
+ if (indexPage || Object.keys(indexPage).length > 0) {
1386
+ const indexRoute = {
1387
+ ...indexPage,
1388
+ data: {
1389
+ ...route.data,
1390
+ title: indexPage?.hideTitle ? undefined : indexPage?.title || route.data?.title,
1391
+ type: EPageType.indexPage,
1392
+ ...indexPage.data,
1393
+ },
1394
+ loadChildren: indexPage?.loadChildren ?? indexPage?.lazyModule,
1395
+ loadComponent: indexPage?.loadComponent ?? indexPage?.lazyComponent,
1396
+ };
1397
+ routes.splice(0, 0, indexPage?.redirectToIndex
1398
+ ? { path: '', redirectTo: 'index', pathMatch: 'full' }
1399
+ : {
1400
+ path: '',
1401
+ ...indexRoute,
1402
+ }, {
1403
+ ...indexRoute,
1404
+ path: 'index',
1405
+ });
1411
1406
  }
1412
1407
  return routes;
1413
1408
  }