Skip to content

Commit 39aff46

Browse files
committed
Move fromIndex and toIndex vards down
1 parent aa4896e commit 39aff46

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/react-native-sortables/src/providers/shared/DragProvider.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -508,9 +508,6 @@ const { DragProvider, useDragContext } = createProvider('Drag')<
508508
const ctx = context.value;
509509
clearAnimatedTimeout(ctx.activationTimeoutId);
510510

511-
const fromIndex = ctx.dragStartIndex;
512-
const toIndex = keyToIndex.value[key]!;
513-
514511
ctx.touchStartTouch = null;
515512
currentTouch.value = null;
516513
activationState.value = DragActivationState.INACTIVE;
@@ -528,6 +525,9 @@ const { DragProvider, useDragContext } = createProvider('Drag')<
528525
multiZoneActiveItemDimensions.value = null;
529526
}
530527

528+
const fromIndex = ctx.dragStartIndex;
529+
const toIndex = keyToIndex.value[key]!;
530+
531531
prevActiveItemKey.value = activeItemKey.value;
532532
ctx.dragStartItemTouchOffset = null;
533533
ctx.dragStartTouchPosition = null;

0 commit comments

Comments
 (0)