Skip to content

Commit

Permalink
fix(concat): handle a given scheduler correctly
Browse files Browse the repository at this point in the history
Fix the static concat operator to handle the scheduler argument
correctly. Previously the scheduler argument was extracted
from the arguments array, then inserted back into the arguments
array, and the fromArray creation method did not receive the
scheduler as a Scheduler, but attempted to use it as an Observable, which
caused a scheduler-related test to fail.
  • Loading branch information
staltz authored and benlesh committed Nov 5, 2015
1 parent f3638f8 commit 8745216
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/operators/concat-static.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export default function concat<R>(...observables: Array<Observable<any> | Schedu
let args = <any[]>observables;
if (typeof (args[observables.length - 1]).schedule === 'function') {
scheduler = args.pop();
args.push(1, scheduler);
}
return (<CoreOperators<any>>Observable.fromArray(observables)).mergeAll(1);
return (<CoreOperators<any>>Observable.fromArray(observables, scheduler)).mergeAll(1);
}

0 comments on commit 8745216

Please sign in to comment.