Skip to content

Commit

Permalink
fix: universal emptyError
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian-Haehnlein committed Dec 7, 2019
1 parent 0bde0f2 commit 14cfa2b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/app/core/store/restore/restore.effects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,16 +140,17 @@ export class RestoreEffects {

@Effect()
sessionKeepAlive$ = this.appRef.isStable.pipe(
takeWhile(() => isPlatformBrowser(this.platformId)),
whenTruthy(),
first(),
concatMapTo(
this.store$.pipe(
takeWhile(() => isPlatformBrowser(this.platformId)),
select(getCurrentBasket),
switchMap(basket =>
this.sfeAdapterService.isInitialized()
? EMPTY
: interval(RestoreEffects.SESSION_KEEP_ALIVE).pipe(mergeMapTo(basket ? [new LoadBasket()] : []))
switchMap(
basket =>
this.sfeAdapterService.isInitialized()
? EMPTY
: interval(RestoreEffects.SESSION_KEEP_ALIVE).pipe(mergeMapTo(basket ? [new LoadBasket()] : [])) // todo: some similar without basket
)
)
)
Expand Down

0 comments on commit 14cfa2b

Please sign in to comment.