globalpayments / rxp-js

Global Payments Ecommerce JavaScript Library
MIT License
34 stars 70 forks source link

Uncaught TypeError: can't access property "removeChild", this.parentElement is null #51

Open Chaosxmk opened 2 years ago

Chaosxmk commented 2 years ago

This block of code seems to be throwing errors:

Element.prototype.remove = function() {
    this.parentElement.removeChild(this);
};

Code should be modified to add something like this: if (this.parentElement == null) return;

I haven't got a clue what's triggering this block of code, as it appears to be firing without any of my code interacting with anything.

sahnisani commented 2 years ago

Hi Chaosxmk!

Same problem on my side. Are you using playwright by any chance?

Chaosxmk commented 2 years ago

I don't have playwright, the only libraries I have installed are jQuery and this.