ngrx - RxJs: subscription performed twice -
i've created subscription:
this.store$.combinelatest( this.store$.select(fromroot.getuserentity), this.store$.select(fromroot.getselectedsourceids), (store, user, selectedsourceids) => ({user: user, selectedsourceids: selectedsourceids}) ) .filter((proj) => proj.user.id != null && proj.user.logged) .do((proj) => this.store$.dispatch({type: 'delete_cards', payload: {username: proj.user.username, tokens: proj.selectedsourceids}})) .take(1) .subscribe();
it's performed (do
code) twice.
could tell me why?
you getting undefined values first time. try using zip
instead of combinelatest
.
Comments
Post a Comment