projects
/
examples
/
angular-tour-of-heroes
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
98c376c
)
WIP: Das macht doch keinen Sinn
author
Kai Moritz
<kai@juplo.de>
Sun, 5 Jul 2020 09:52:58 +0000
(11:52 +0200)
committer
Kai Moritz
<kai@juplo.de>
Sun, 5 Jul 2020 09:52:58 +0000
(11:52 +0200)
src/app/vorgang/vorgang.component.ts
patch
|
blob
|
history
diff --git
a/src/app/vorgang/vorgang.component.ts
b/src/app/vorgang/vorgang.component.ts
index
986b1b2
..
903ff6d
100644
(file)
--- a/
src/app/vorgang/vorgang.component.ts
+++ b/
src/app/vorgang/vorgang.component.ts
@@
-21,7
+21,12
@@
export class VorgangComponent implements OnInit {
private store: Store<{ vorgang: { vorgaenge: Vorgang[] }}>) {
this.vorgang$ = store.pipe(select('vorgang')).pipe(
tap((state) => console.log(`New state: ${JSON.stringify(state)}`)),
- map((state: State) => state.vorgaenge));
+ map((state: State) => {
+ if (state === undefined)
+ return [];
+ else
+ return state.vorgaenge
+ }));
}
ngOnInit(): void {