-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug? Perhaps improper behavior of throttle(fn) #2466
Comments
This was referenced Sep 24, 2017
Closing as stale |
MatthiasKunnen
added a commit
to MatthiasKunnen/rxjs
that referenced
this issue
Apr 23, 2019
Fix an issue with throttleTime emitting both leading and trailing values in the same time window. Double emission problem: source: a123b12-c-23d-2-ef--- expected: a---b---c---d---e---f actual: a---b1---c2---2-e---f Closes ReactiveX#2466 and ReactiveX#2727. Follows ReactiveX#2749 and ReactiveX#2864. BREAKING CHANGE: throttleTime no longer emits both leading and trailing values in the same time window.
MatthiasKunnen
added a commit
to MatthiasKunnen/rxjs
that referenced
this issue
Jul 24, 2019
Fix an issue with throttleTime emitting both leading and trailing values in the same time window. Double emission problem: source: a123b12-c-23d-2-ef--- expected: a---b---c---d---e---f actual: a---b1---c2---2-e---f Closes ReactiveX#2466 and ReactiveX#2727. Follows ReactiveX#2749 and ReactiveX#2864. BREAKING CHANGE: throttleTime no longer emits both leading and trailing values in the same time window.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
RxJS version: 5.0.0-alpha.* to 5.2.0
Code to reproduce:
Expected behavior:
logs:
Actual behavior:
logs
Additional information:
Apparently, the
durationSelector
function is called, and it's result is subscribed to before the leading value is emitted. This seems unintuitive, as it's that value that triggered the need to get the duration notifier from thedurationSelector
to begin with.If we "fix" this, it is, indeed, a breaking change.
The text was updated successfully, but these errors were encountered: