-
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
fix(delayWhen): correctly handle synchronous duration observable #2589
Conversation
This shouldn't cause any breaking changes. |
@@ -56,7 +56,7 @@ export function delayWhen<T>(this: Observable<T>, delayDurationSelector: (value: | |||
subscriptionDelay?: Observable<any>): Observable<T> { | |||
if (subscriptionDelay) { | |||
return new SubscriptionDelayObservable(this, subscriptionDelay) | |||
.lift(new DelayWhenOperator(delayDurationSelector)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future, these sorts of formatting corrections should be in a separate commit for easier review.
@@ -112,7 +112,7 @@ class DelayWhenSubscriber<T, R> extends OuterSubscriber<T, R> { | |||
this.tryDelay(delayNotifier, value); | |||
} | |||
} catch (err) { | |||
this.destination.error(err); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description:
This PR fixes outersubscriber behavior of delayWhen operator, to complete it correctly when duration selector returns synchronous observable. Similar to #1490 in crux.
Related issue (if exists):