From 7d75ea9a93d0b11ab6fe57388deb6777fe27f9c8 Mon Sep 17 00:00:00 2001 From: Sam Hariri <137707942+samh-nl@users.noreply.github.com> Date: Tue, 19 Sep 2023 22:33:36 +0200 Subject: [PATCH] fix: clear errors when removing waypoint --- src/libs/actions/Transaction.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libs/actions/Transaction.js b/src/libs/actions/Transaction.js index 663dfd1c8564..81764a9c62be 100644 --- a/src/libs/actions/Transaction.js +++ b/src/libs/actions/Transaction.js @@ -138,6 +138,10 @@ function removeWaypoint(transactionID, currentIndex) { if (!isRemovedWaypointEmpty) { newTransaction = { ...newTransaction, + // Clear any errors that may be present, which apply to the old route + errorFields: { + route: null, + }, // Clear the existing route so that we don't show an old route routes: { route0: {