Skip to content

Commit

Permalink
Merge 63ae506 into 5760d5a
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-buer committed Jul 20, 2016
2 parents 5760d5a + 63ae506 commit cc6f7b8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions spec/operators/combineLatest-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,4 +461,14 @@ describe('Observable.prototype.combineLatest', () => {
expectSubscriptions(e1.subscriptions).toBe(e1subs);
expectSubscriptions(e2.subscriptions).toBe(e2subs);
});

it('should emit unique array instances with the default projection', () => {
const e1 = hot('-a--b--|');
const e2 = hot('--1--2-|');
const expected = '-------(c|)';

const result = e1.combineLatest(e2).distinct().count();

expectObservable(result).toBe(expected, { c: 3 });
});
});
2 changes: 1 addition & 1 deletion src/operator/combineLatest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export class CombineLatestSubscriber<T, R> extends OuterSubscriber<T, R> {
if (this.project) {
this._tryProject(values);
} else {
this.destination.next(values);
this.destination.next(values.slice());
}
}
}
Expand Down

0 comments on commit cc6f7b8

Please sign in to comment.