From de5a3763d5a1f9dac15ce724c8f6436b80e73518 Mon Sep 17 00:00:00 2001 From: ValentinIlnitskiy <79172266+ValentinIlnitskiy@users.noreply.github.com> Date: Fri, 24 Nov 2023 21:09:09 +0100 Subject: [PATCH] Remove unnecessary expression from arrayMove function --- packages/sortable/src/utilities/arrayMove.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/sortable/src/utilities/arrayMove.ts b/packages/sortable/src/utilities/arrayMove.ts index d0f89b6a..b34670bd 100644 --- a/packages/sortable/src/utilities/arrayMove.ts +++ b/packages/sortable/src/utilities/arrayMove.ts @@ -3,11 +3,7 @@ */ export function arrayMove(array: T[], from: number, to: number): T[] { const newArray = array.slice(); - newArray.splice( - to < 0 ? newArray.length + to : to, - 0, - newArray.splice(from, 1)[0] - ); + newArray.splice(to, 0, newArray.splice(from, 1)[0]); return newArray; }