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

FlatfileButtonComponent may break during ngOnDestroy #21

Open
moreira opened this issue Sep 22, 2021 · 2 comments · May be fixed by #34
Open

FlatfileButtonComponent may break during ngOnDestroy #21

moreira opened this issue Sep 22, 2021 · 2 comments · May be fixed by #34

Comments

@moreira
Copy link

moreira commented Sep 22, 2021

Dsscription

When FlatfileButtonComponent's ngOnDestroy is called before ngOnInit, the flatfileImporter field isn't initialized throwing an error during the ngOnDestroy.

Notes

This issue can happen when a route change is triggered before the component is properly initialized. In this situation the ngOnInit isn't called but the ngOnDestroy is.

Screenshot

Screen Shot 2021-09-22 at 7 27 55 AM

:
@sand-head
Copy link

I've found that it also throws an error if you let the component initialize, but a route change occurs before the button is clicked.

image

@kevin-induro
Copy link

I'm sure there's a nicer way to handle it than an empty catch block, but this is a huge issue for us. We're going to have to fork if this is not fixed because we regularly switch hide and show the button through an *ngIf.

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 a pull request may close this issue.

3 participants