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

'hasOwnProperty' in javascript -

python - ValueError: No axis named 1 for object type <class 'pandas.core.series.Series'> -

Command prompt result in label. Python 2.7 -