Skip to content

Commit

Permalink
fix: debounce loading wishlists to prevent picking up wrong token
Browse files Browse the repository at this point in the history
  • Loading branch information
dhhyi committed Apr 29, 2020
1 parent 89f0369 commit cf35e52
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Injectable } from '@angular/core';
import { Actions, Effect, ofType } from '@ngrx/effects';
import { Store, select } from '@ngrx/store';
import { filter, map, mapTo, mergeMap, switchMap, withLatestFrom } from 'rxjs/operators';
import { debounceTime, filter, map, mapTo, mergeMap, switchMap, withLatestFrom } from 'rxjs/operators';

import { SuccessMessage } from 'ish-core/store/messages';
import { selectRouteParam } from 'ish-core/store/router';
Expand Down Expand Up @@ -188,6 +188,7 @@ export class WishlistEffects {
loadWishlistsAfterLogin$ = this.store.pipe(
select(getUserAuthorized),
whenTruthy(),
debounceTime(1000),
mapTo(new wishlistsActions.LoadWishlists())
);

Expand Down

0 comments on commit cf35e52

Please sign in to comment.