-
Notifications
You must be signed in to change notification settings - Fork 68
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
reinitialize causes DOMException for missing or moved child node on Chrome Browser #152
Comments
Update The error seems to only be occurring on Chromium based Browsers (Tested in Chrome and Android WebView). |
I am also seeing this is Chrome but not Firefox. Any updates? |
@4lki I am catching the error, but the btn is still going away. Any chance you can give an example of how you are handling it? |
@huntonas Ok, my first hotfix was to alter this:
into this :
on line 313 of ngx-paypal.js ...but since i didn't want to fork this repo and maintain my hotfix, i found a template based solution: By not updating the component config, but recreating it with an ngIf Clause it never calls for reinitialize():
then simply set your payPalConfig to undefined first, to clear it from view before updating your payPalConfig.
Hope this helps |
I am getting the exact same issue, thanks for the solution. This needs to be resolved by the maintainers of this library |
+1 - would appreciate a fix for this very much! |
The error occurs, whenever the order config gets updated and is caused by the reinitialize function.
As an error example i point to the project-demo at https://enngage.github.io/ngx-paypal/.
Just change the Dollar amount of the order and get this:
ERROR DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is no longer a child of this node. Perhaps it was moved in response to a mutation?
The error is kind of odd, because it removes the child node as expected, but still throws an error.
So as a workaround just catching the error works.
Deps:
Angular 11
ngx-paypal 6.2.0
The text was updated successfully, but these errors were encountered: