From 111c1a298a6827f5629975e567ec376730905d82 Mon Sep 17 00:00:00 2001 From: Yauheni Date: Mon, 5 Feb 2024 16:59:21 +0100 Subject: [PATCH 1/2] Fix bug with Distance - By adding 2nd add stop user can delete empty location --- src/pages/iou/request/step/IOURequestStepWaypoint.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/iou/request/step/IOURequestStepWaypoint.js b/src/pages/iou/request/step/IOURequestStepWaypoint.js index 4c35951bc297..e9a3b13b0dc6 100644 --- a/src/pages/iou/request/step/IOURequestStepWaypoint.js +++ b/src/pages/iou/request/step/IOURequestStepWaypoint.js @@ -113,8 +113,8 @@ function IOURequestStepWaypoint({ const locationBias = useLocationBias(allWaypoints, userLocation); const waypointAddress = lodashGet(currentWaypoint, 'address', ''); - // Hide the menu when there is only start and finish waypoint - const shouldShowThreeDotsButton = waypointCount > 2; + // Hide the menu when there is only start and finish waypoint and the current waypoint is not empty + const shouldShowThreeDotsButton = waypointCount > 2 && waypointAddress; const shouldDisableEditor = isFocused && (Number.isNaN(parsedWaypointIndex) || parsedWaypointIndex < 0 || parsedWaypointIndex > waypointCount || (filledWaypointCount < 2 && parsedWaypointIndex >= waypointCount)); From 9070dc4c74fc95937cc30b95124420e16acd2af7 Mon Sep 17 00:00:00 2001 From: Yauheni Date: Mon, 5 Feb 2024 17:09:32 +0100 Subject: [PATCH 2/2] Update comment for shouldShowThreeDotsButton --- src/pages/iou/request/step/IOURequestStepWaypoint.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/iou/request/step/IOURequestStepWaypoint.js b/src/pages/iou/request/step/IOURequestStepWaypoint.js index e9a3b13b0dc6..93a87baa0481 100644 --- a/src/pages/iou/request/step/IOURequestStepWaypoint.js +++ b/src/pages/iou/request/step/IOURequestStepWaypoint.js @@ -113,7 +113,7 @@ function IOURequestStepWaypoint({ const locationBias = useLocationBias(allWaypoints, userLocation); const waypointAddress = lodashGet(currentWaypoint, 'address', ''); - // Hide the menu when there is only start and finish waypoint and the current waypoint is not empty + // Hide the menu when there is only start and finish waypoint or the current waypoint is empty const shouldShowThreeDotsButton = waypointCount > 2 && waypointAddress; const shouldDisableEditor = isFocused &&