Fix an error in sidebar

This commit is contained in:
Konstantinos Triantafyllou 2022-12-20 17:39:51 +02:00
parent 06f2f586a8
commit 5bd828d03c
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ export class SideBarComponent implements AfterViewInit {
ngAfterViewInit() {
if(this.nav) {
setTimeout(() => {
if(this.items[this.activeIndex].items.length > 0) {
if(this.items[this.activeIndex]?.items?.length > 0) {
UIkit.nav(this.nav.nativeElement).toggle(this.activeIndex, true);
}
});