Skip to content

Commit

Permalink
fix(database): use switchMap
Browse files Browse the repository at this point in the history
Closes angular#830.
  • Loading branch information
cartant committed Feb 17, 2017
1 parent adecdfd commit 82b94f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/database/firebase_list_factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { observeOn } from 'rxjs/operator/observeOn';
import { observeQuery } from './query_observable';
import { Query, FirebaseListFactoryOpts } from '../interfaces';
import * as utils from '../utils';
import { mergeMap } from 'rxjs/operator/mergeMap';
import { switchMap } from 'rxjs/operator/switchMap';
import { map } from 'rxjs/operator/map';

export function FirebaseListFactory (
Expand All @@ -32,7 +32,7 @@ export function FirebaseListFactory (

const queryObs = observeQuery(query);
return new FirebaseListObservable(ref, subscriber => {
let sub = mergeMap.call(map.call(queryObs, query => {
let sub = switchMap.call(map.call(queryObs, query => {
let queried: firebase.database.Query = ref;
// Only apply the populated keys
// apply ordering and available querying options
Expand Down

0 comments on commit 82b94f0

Please sign in to comment.