Skip to content
This repository was archived by the owner on Jul 18, 2021. It is now read-only.

Conversation

@mriegr
Copy link

@mriegr mriegr commented Apr 10, 2019

Prevent calling unsubscribe function on RxJs Subject which causes ObjectUnsubscribedError

@jepstein-eagle
Copy link

Great idea to catch this case!

Is this possible without importing rxjs as a dependency? It would be awesome to avoid increasing the bundle size for downstream consumers who do not use rxjs...

@NetanelBasal
Copy link
Owner

@marcelriegr, can you give me an example for this use case, please?

@ryaa
Copy link

ryaa commented Dec 4, 2019

See https://stackblitz.com/edit/angular-route-navigate-acifsw

The problem is that sometimes (and this is intermittent!) the componentDestroyed.next() in ngOnDestroy is invoked after ngx-auto-unsubscribe unsubscribes therefore there will be an error ObjectUnsubscribedError

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants