Skip to content

Commit

Permalink
Merge pull request #46 from fluffynuts/fix-json-error-when-navitems-u…
Browse files Browse the repository at this point in the history
…ndefined

fix: should not throw errors when navItems are undefined
  • Loading branch information
xidedix authored Feb 5, 2019
2 parents 24fae2f + 2bc6b32 commit 35d7a93
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export class AppSidebarNavComponent implements OnChanges {
}

public ngOnChanges(changes: SimpleChanges): void {
this.navItemsArray = JSON.parse(JSON.stringify(this.navItems));
this.navItemsArray = JSON.parse(JSON.stringify(this.navItems || []));
}

constructor() { }
Expand Down

0 comments on commit 35d7a93

Please sign in to comment.