Skip to content

Commit 51c7996

Browse files
Merge pull request #547 from Monchi/master
Add null check to avoid an edge case error
2 parents 20c043e + 369ae71 commit 51c7996

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/vuedraggable.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ function buildAttribute(object, propName, value) {
1010
}
1111

1212
function removeNode(node) {
13-
node.parentElement.removeChild(node);
13+
if (node.parentElement !== null) {
14+
node.parentElement.removeChild(node);
15+
}
1416
}
1517

1618
function insertNodeAt(fatherNode, node, position) {

0 commit comments

Comments
 (0)