Skip to content
This repository was archived by the owner on Jun 18, 2018. It is now read-only.

Commit 9538acd

Browse files
committed
Only call endDrag() if we are still dragging
This should fix the crash in #6 although it's unclear whether it solves the issue
1 parent bd4a51b commit 9538acd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/HTML5Backend.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,9 @@ export default class HTML5Backend {
195195
return;
196196
}
197197

198-
this.actions.endDrag();
199-
this.clearCurrentDragSourceNode();
198+
if (this.clearCurrentDragSourceNode()) {
199+
this.actions.endDrag();
200+
}
200201
}
201202

202203
setCurrentDragSourceNode(node) {

0 commit comments

Comments
 (0)