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

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -