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

_destroyBait needs to check for existence of bait before trying to remove it #29

Open
m90 opened this issue Mar 12, 2018 · 0 comments
Open

Comments

@m90
Copy link

m90 commented Mar 12, 2018

From looking at the errors in our Sentry setup I can see that there are cases where the bait has already been removed by someone before the library calls the _destroyBait method here:

window.document.body.removeChild(this._var.bait);

Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.

Since the library theoretically emits the events after removing the bait, this will never happen in case the above throws.

Ideally the library would simply check if the bait is still in the DOM before trying to remove it.

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

No branches or pull requests

1 participant