Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9c146f6

Browse files
committedMar 7, 2017
Allow the tree to drop successfully outside its own scope without causing the internal tree structure to become corrupt
1 parent 0953ffa commit 9c146f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/react-sortable-tree.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ class ReactSortableTree extends Component {
262262
}
263263

264264
endDrag(dropResult) {
265-
if (!dropResult) {
265+
if (!dropResult || !dropResult.node) {
266266
return this.setState({
267267
draggingTreeData: null,
268268
swapFrom: null,

0 commit comments

Comments
 (0)
Failed to load comments.