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

selection.clone crashes when elements are detached. #215

Closed
mbostock opened this issue May 17, 2019 · 0 comments · Fixed by #216
Closed

selection.clone crashes when elements are detached. #215

mbostock opened this issue May 17, 2019 · 0 comments · Fixed by #216

Comments

@mbostock
Copy link
Member

It tries to call element.parentNode.insertBefore, but the parent is null, so:

TypeError: Cannot read property 'insertBefore' of null

Instead, selection.clone should just call element.cloneNode if the parent is null.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant