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

Cannot read property 'removeChild' of null #911

Open
viceice opened this issue Jan 25, 2019 · 3 comments
Open

Cannot read property 'removeChild' of null #911

viceice opened this issue Jan 25, 2019 · 3 comments

Comments

@viceice
Copy link
Contributor

viceice commented Jan 25, 2019

If i destroy a slider, who's parent node has been removed from the dom, it will crash here:

this.sliderElem.parentNode.removeChild(this.sliderElem);

@viceice
Copy link
Contributor Author

viceice commented Jan 25, 2019

I'm calling destroy from ko.utils.domNodeDisposal.addDisposeCallback callback.

@seiyria
Copy link
Owner

seiyria commented Jan 25, 2019

You'll need to provide a demo. But also I'm not sure this happens with any of the other libraries we list so if this is exclusive to knockout then it might just be a knockout problem.

@viceice
Copy link
Contributor Author

viceice commented Jan 25, 2019

Ok, i will try to build a fiddle. My current workaround is to use JQuery.empty to cleanup.

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

2 participants