68067: Route menu data - menu ID

This commit is contained in:
Kristof De Langhe
2020-05-19 17:34:56 +02:00
parent 8761d0ac27
commit 79eecc7c76
2 changed files with 13 additions and 6 deletions

View File

@@ -125,11 +125,11 @@ export class MenuComponent implements OnInit, OnDestroy {
const data = route.snapshot.data;
const last: boolean = hasNoValue(route.firstChild);
if (hasValue(data) && hasValue(data.menu)) {
if (hasValue(data) && hasValue(data.menu) && hasValue(data.menu[this.menuID])) {
if (!last) {
return [...data.menu, ...this.resolveMenuSections(route.firstChild)]
return [...data.menu[this.menuID], ...this.resolveMenuSections(route.firstChild)]
} else {
return [...data.menu];
return [...data.menu[this.menuID]];
}
}