Skip to content

Commit

Permalink
fix(throttleTime): fix single value with leading disabled, trailing e…
Browse files Browse the repository at this point in the history
…nabled

Emit single value with leading disabled, trailing enabled.

Closes ReactiveX#2859 and ReactiveX#4491.
  • Loading branch information
MatthiasKunnen committed Feb 14, 2019
1 parent 2db0016 commit 0cbbbae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/internal/operators/throttleTime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ class ThrottleTimeSubscriber<T> extends Subscriber<T> {
this.add(this.throttled = this.scheduler.schedule<DispatchArg<T>>(dispatchNext, this.duration, { subscriber: this }));
if (this.leading) {
this.destination.next(value);
} else if (this.trailing) {
this._trailingValue = value;
this._hasTrailingValue = true;
}
}
}
Expand Down

0 comments on commit 0cbbbae

Please sign in to comment.