Skip to content
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

Check before calling unsubscribe in ngOnDestroy #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lujakob
Copy link

@lujakob lujakob commented Apr 26, 2017

Karma testing a component that uses in it's template will cause the following error:

TypeError: Cannot read property 'unsubscribe' of undefined
at TagInputComponent.ngOnDestroy (webpack:///~/angular2-tag-input/dist/lib/components/tag-input/tag-input.component.js:207:0 <- src/test.ts:94090:34)

Therefore I think it would make sense to check before unsubscribing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant