-
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(AsyncSubject): properly emits values during reentrant subscriptions #6522
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,10 +14,10 @@ export class AsyncSubject<T> extends Subject<T> { | |
|
||
/** @internal */ | ||
protected _checkFinalizedStatuses(subscriber: Subscriber<T>) { | ||
const { hasError, _hasValue, _value, thrownError, isStopped } = this; | ||
const { hasError, _hasValue, _value, thrownError, isStopped, _isComplete } = this; | ||
if (hasError) { | ||
subscriber.error(thrownError); | ||
} else if (isStopped) { | ||
} else if (isStopped || _isComplete) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Basically, there's a temporal space where we're |
||
_hasValue && subscriber.next(_value!); | ||
subscriber.complete(); | ||
} | ||
|
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.
We need to get prettier going on this file. This was just moving a space that was bothering me. haha.