Skip to content

Commit

Permalink
fix(expand): fix expand's concurrency behavior
Browse files Browse the repository at this point in the history
Fix expand() in order to emit each next value only once. It was previously emitting those values
multiple times when a concurrency limit was set.
  • Loading branch information
staltz authored and kwonoj committed Nov 30, 2015
1 parent 4411e1f commit 01f86e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/operators/expand-support.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export class ExpandSubscriber<T, R> extends OuterSubscriber<T, R> {

_next(value: any): void {
const index = this.index++;
this.destination.next(value);
if (this.active < this.concurrent) {
this.destination.next(value);
let result = tryCatch(this.project)(value, index);
if (result === errorObject) {
this.destination.error(result.e);
Expand Down

0 comments on commit 01f86e5

Please sign in to comment.