Skip to content

Commit 8745216

Browse files
staltzbenlesh
authored andcommitted
fix(concat): handle a given scheduler correctly
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.
1 parent f3638f8 commit 8745216

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/operators/concat-static.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export default function concat<R>(...observables: Array<Observable<any> | Schedu
1515
let args = <any[]>observables;
1616
if (typeof (args[observables.length - 1]).schedule === 'function') {
1717
scheduler = args.pop();
18-
args.push(1, scheduler);
1918
}
20-
return (<CoreOperators<any>>Observable.fromArray(observables)).mergeAll(1);
19+
return (<CoreOperators<any>>Observable.fromArray(observables, scheduler)).mergeAll(1);
2120
}

0 commit comments

Comments
 (0)