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

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -