Tap kills the Subject on unsubscription #7078
Labels
7.x
Issues and PRs for version 7.x
8.x
Issues and PRs for version 8.x
AGENDA ITEM
Flagged for discussion at core team meetings
bug
Confirmed bug
Describe the bug
When using
tap
passing in a Subject directly (i.e. without using{ next, error, complete }
), if the resulting observer creates a subscription and unsubscribes from it, then the Subject is also unsubscribed: If a new subscriber comes, it will throw anObjectUnsubscribedError
.I've bisected this happened somewhere in between 7.2.0 and 7.3.0
Expected behavior
When the resulting subscription is closed, the Subject should not be killed: The new subscription should work just as fine as the initial one.
Reproduction code
Reproduction URL
https://stackblitz.com/edit/rxjs-a9l4j2?file=index.ts
Version
7.3.0
Environment
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: