File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -671,8 +671,10 @@ export default function sortableContainer(
671
671
// If it moves passed the right bounds, then animate it to the first position of the next row.
672
672
// We just use the offset of the next node to calculate where to move, because that node's original position
673
673
// is exactly where we want to go
674
- translate . x = nextNode . edgeOffset . left - edgeOffset . left ;
675
- translate . y = nextNode . edgeOffset . top - edgeOffset . top ;
674
+ if ( nextNode ) {
675
+ translate . x = nextNode . edgeOffset . left - edgeOffset . left ;
676
+ translate . y = nextNode . edgeOffset . top - edgeOffset . top ;
677
+ }
676
678
}
677
679
if ( this . newIndex === null ) {
678
680
this . newIndex = index ;
@@ -696,8 +698,10 @@ export default function sortableContainer(
696
698
// If it moves passed the left bounds, then animate it to the last position of the previous row.
697
699
// We just use the offset of the previous node to calculate where to move, because that node's original position
698
700
// is exactly where we want to go
699
- translate . x = prevNode . edgeOffset . left - edgeOffset . left ;
700
- translate . y = prevNode . edgeOffset . top - edgeOffset . top ;
701
+ if ( prevNode ) {
702
+ translate . x = prevNode . edgeOffset . left - edgeOffset . left ;
703
+ translate . y = prevNode . edgeOffset . top - edgeOffset . top ;
704
+ }
701
705
}
702
706
this . newIndex = index ;
703
707
}
You can’t perform that action at this time.
0 commit comments