fixed an issue where the reducers wouldn't be combined correctly when using AoT compilation

This commit is contained in:
Art Lowel
2016-12-13 12:03:04 +01:00
parent 5fbf07d838
commit d3370e266a
3 changed files with 20 additions and 9 deletions

View File

@@ -19,9 +19,7 @@ export class HeaderComponent implements OnInit {
}
ngOnInit(): void {
this.isNavBarCollapsed = this.store.select('headerReducer')
//ensure that state is not null, can happen when using AoT compilation
.filter((state: HeaderState) => state !== null && state !== undefined)
this.isNavBarCollapsed = this.store.select('header')
//unwrap navCollapsed
.map(({ navCollapsed }: HeaderState) => navCollapsed);
}