Skip to content

Commit 9b73c46

Browse files
extremeandybenlesh
authored andcommitted
fix(combineLatest): Don't mutate array of observables passed to (#2276)
combineLatest lease enter the commit message for your changes. Lines starting
1 parent f8ba77d commit 9b73c46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/operator/combineLatest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export function combineLatest<T, R>(this: Observable<T>, ...observables: Array<O
7979
// if the first and only other argument besides the resultSelector is an array
8080
// assume it's been called with `combineLatest([obs1, obs2, obs3], project)`
8181
if (observables.length === 1 && isArray(observables[0])) {
82-
observables = <any>observables[0];
82+
observables = (<any>observables[0]).slice();
8383
}
8484

8585
observables.unshift(this);

0 commit comments

Comments
 (0)