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
Other (e.g. Ionic/Cordova, Node, browser, operating system):
How to reproduce these conditions
Failing test unit, Plunkr, or JSFiddle demonstrating the problem
No plunker possible
Steps to set up and reproduce
In my service I have a call to a collection query by multiple where clauses and return back a single observable.
public getStreams(eventID: string, activityID: string, types: string[]): Observable<StreamInterface[]> {
return combineLatest.apply(this, types.map((type) => {
return this.afs
.collection('events')
.doc(eventID)
.collection('activities')
.doc(activityID)
.collection('streams', ref => ref.where('type', '==', type))
.snapshotChanges()
.pipe(map((streamSnapshots) => { // @todo should be reduce
return this.processStreamSnapshots(streamSnapshots)[0] // Get the first element of the return
})) // since the return with equality on the query should only fetch one afaik in my model
})).pipe(map((streams: StreamInterface[]) => {
return streams.filter((stream) => !!stream)
}))
Then I have some other call that fetches everything from that collection
Uh oh!
There was an error while loading. Please reload this page.
Version info
Angular: 7.1.3
Firebase: 5.7.0
**AngularFire:**5.1.1
Other (e.g. Ionic/Cordova, Node, browser, operating system):
How to reproduce these conditions
Failing test unit, Plunkr, or JSFiddle demonstrating the problem
No plunker possible
Steps to set up and reproduce
I am calling and subscribing first on the multiple where query of my service eg:
Than at some point later I subscribe also to the "all" list
However the 'all' call gets triggered 2 times.
One it returns the results of the:
... which in my logic is an array of 2
And the second time it returns as expected all the results. (Array of lets say 20)
What am I missing or is this a bug
I would expect only one call with just all the results
Sample data and security rules
No data
Debug output
** Errors in the JavaScript console **
** Output from
firebase.database().enableLogging(true);
**** Screenshots **
Expected behavior
See description
Actual behavior
See description
The text was updated successfully, but these errors were encountered: