You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
runs an observable-based query to select odd numbers
re-runs the query to select even numbers
writes more data - including both an even and an odd number - to the database
Note that after more data is written, the list observable emits a list that matches the first (odd) query and then the second (even) query.
The bug is due to mergeMap - which is used here - the behaviour of which is to allow merged observables to continue to emit. switchMap should be used instead.
Expected behavior
When an observable query changes, the list observable should emit only lists that relate to the changed query.
Actual behavior
When an observable query changes, the list observable emits lists that relate to the changed query and any previous queries.
The text was updated successfully, but these errors were encountered:
cartant
added a commit
to cartant/angularfire
that referenced
this issue
Feb 17, 2017
Version info
Angular: 2.4.7
Firebase: 3.6.9
AngularFire: 2.0.0-beta.8
Other (e.g. Ionic/Cordova, Node, browser, operating system): N/A
How to reproduce these conditions
There is a plunk here that demonstrates the bug.
Steps to set up and reproduce
Run the above plunk which:
Note that after more data is written, the list observable emits a list that matches the first (odd) query and then the second (even) query.
The bug is due to
mergeMap
- which is used here - the behaviour of which is to allow merged observables to continue to emit.switchMap
should be used instead.Expected behavior
When an observable query changes, the list observable should emit only lists that relate to the changed query.
Actual behavior
When an observable query changes, the list observable emits lists that relate to the changed query and any previous queries.
The text was updated successfully, but these errors were encountered: