Skip to content

Commit ed03217

Browse files
authored
Update index.js
defense code for this.helper.parentNode.removeChild(this.helper);
1 parent caf3c4f commit ed03217

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/SortableContainer/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,9 @@ export default function sortableContainer(
501501
}
502502

503503
// Remove the helper from the DOM
504-
this.helper.parentNode.removeChild(this.helper);
504+
if (this.helper && this.helper.parentNode) {
505+
this.helper.parentNode.removeChild(this.helper);
506+
}
505507

506508
if (hideSortableGhost && this.sortableGhost) {
507509
setInlineStyles(this.sortableGhost, {

0 commit comments

Comments
 (0)