Skip to content

Commit 313339e

Browse files
hamedbaatourzjffun
authored andcommitted
add checks before start a swap animation
Fixes Shopify#261
1 parent 23314bb commit 313339e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Plugins/SwapAnimation/SwapAnimation.js

+4
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ export default class SwapAnimation extends AbstractPlugin {
8383
[onSortableSorted]({oldIndex, newIndex, dragEvent}) {
8484
const {source, over} = dragEvent;
8585

86+
if (!source || !over) {
87+
return;
88+
}
89+
8690
cancelAnimationFrame(this.lastAnimationFrame);
8791

8892
// Can be done in a separate frame

0 commit comments

Comments
 (0)