Skip to content

Commit 2bc6b32

Browse files
committed
fix: should not throw errors when navItems are undefined
1 parent 0951140 commit 2bc6b32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

projects/coreui/angular/src/lib/sidebar/app-sidebar-nav.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export class AppSidebarNavComponent implements OnChanges {
7777
}
7878

7979
public ngOnChanges(changes: SimpleChanges): void {
80-
this.navItemsArray = JSON.parse(JSON.stringify(this.navItems));
80+
this.navItemsArray = JSON.parse(JSON.stringify(this.navItems || []));
8181
}
8282

8383
constructor() { }

0 commit comments

Comments
 (0)