fix https://github.com/sveltejs/svelte/issues/2086: detach error when node is not attached to DOM

pull/3156/head
Brian Takita 6 years ago
parent 9883a50bf9
commit d57eadd52b

@ -7,7 +7,9 @@ export function insert(target: Node, node: Node, anchor?: Node) {
}
export function detach(node: Node) {
if (node.parentNode) {
node.parentNode.removeChild(node);
}
}
export function detach_between(before: Node, after: Node) {

Loading…
Cancel
Save