From 24e637dfeb096e87c1d6494cb49255bbe4b8e7fe Mon Sep 17 00:00:00 2001 From: Jakub Kosmydel <104823336+kosmydel@users.noreply.github.com> Date: Fri, 12 Apr 2024 10:14:53 +0200 Subject: [PATCH] fix issue --- src/pages/iou/request/step/IOURequestStepDistance.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/iou/request/step/IOURequestStepDistance.tsx b/src/pages/iou/request/step/IOURequestStepDistance.tsx index 13d6f9360a84..fae07ad2249c 100644 --- a/src/pages/iou/request/step/IOURequestStepDistance.tsx +++ b/src/pages/iou/request/step/IOURequestStepDistance.tsx @@ -197,7 +197,7 @@ function IOURequestStepDistance({ const newWaypoints: WaypointCollection = {}; let emptyWaypointIndex = -1; data.forEach((waypoint, index) => { - newWaypoints[`waypoint${index}`] = waypoints.waypoint ?? {}; + newWaypoints[`waypoint${index}`] = waypoints[waypoint] ?? {}; // Find waypoint that BECOMES empty after dragging if (isEmpty(newWaypoints[`waypoint${index}`]) && !isEmpty(waypoints[`waypoint${index}`] ?? {})) { emptyWaypointIndex = index;