-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
ConfirmDialog throws exception during onDestroy #8585
Comments
Thanks for the clear bug. After 2 days of head bashing I finally got here. We have the same exact issue. in our case if we run one of these tests individually they work. But when the tests run and they both run we get that "ViewDestroyedError: Attempt to use a destroyed view: detectChanges" error
|
I our case I was able to work around this by mocking the function below.
The real solution is the same thing that was done for this bug. Check to see if destroyed before doing change detection. #8044 and #8127 |
how to update my application with this ConfirmationDialog version ? |
Set for 9.0.1 tomorrow. |
I'm having this same problem in 9.1.3
|
I am having this (same) issue with primeng 10.0.2. Dirty tweaked with: this.confirmationService.confirm({ just to give it time to close properly. |
Having this issue on v10 as well |
I'm submitting a ... (check one with "x")
Plunkr Case (Bug Reports)
Please demonstrate your case at stackblitz by using the issue template below. Issues without a test case have much less possibility to be reviewd in detail and assisted.
https://stackblitz.com/edit/angular-nnhvnm
Current behavior
When p-confirmDialog component is destroyed, code executed in confirmdialog's onDestroy throws exception:
Expected behavior
ConfirmDialog is destroyed without exception.
Minimal reproduction of the problem with instructions
https://angular-nnhvnm.stackblitz.io click "Remove confirmation dialog from dom to trigger error" and see exception in console.
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
Language: TypeScript
Node (for AoT issues): v12.14.1
The text was updated successfully, but these errors were encountered: