From 01f86e54883d2408b270ffd10f0cc565de0dcfcb Mon Sep 17 00:00:00 2001 From: Andre Staltz Date: Wed, 25 Nov 2015 16:11:38 -0200 Subject: [PATCH] fix(expand): fix expand's concurrency behavior 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. --- src/operators/expand-support.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/operators/expand-support.ts b/src/operators/expand-support.ts index ad00cc9548..7b16b1969b 100644 --- a/src/operators/expand-support.ts +++ b/src/operators/expand-support.ts @@ -34,8 +34,8 @@ export class ExpandSubscriber extends OuterSubscriber { _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);