@@ -952,8 +952,8 @@ function getUpdateMoneyRequestParams(params: GetUpdateMoneyRequestParamsType): U
952952 // only edited the distance number. Detect whether the addresses actually changed so we can skip the
953953 // optimistic side effects (pending field, route clearing, render-path swap to interactive map) that
954954 // would otherwise make the parent map briefly disappear on a pure distance edit.
955- const haveWaypointsActuallyChanged = 'waypoints' in transactionChanges && haveWaypointAddressesChanged ( transaction ?. comment ?. waypoints , transactionChanges . waypoints ) ;
956- const shouldSuppressWaypointsAsPending = 'waypoints' in transactionChanges && ! haveWaypointsActuallyChanged ;
955+ const hasWaypointAddressesChanged = 'waypoints' in transactionChanges && haveWaypointAddressesChanged ( transaction ?. comment ?. waypoints , transactionChanges . waypoints ) ;
956+ const shouldSuppressWaypointsAsPending = 'waypoints' in transactionChanges && ! hasWaypointAddressesChanged ;
957957
958958 // Step 1: Set any "pending fields" (ones updated while the user was offline) to have error messages in the failureData
959959 const pendingFields : OnyxTypes . Transaction [ 'pendingFields' ] = Object . fromEntries (
@@ -1282,7 +1282,7 @@ function getUpdateMoneyRequestParams(params: GetUpdateMoneyRequestParamsType): U
12821282 // locally), keep it so the receipt thumbnail and ConfirmedRoute don't flicker between success and
12831283 // the Pusher route push.
12841284 const hasValidOptimisticRoute = ! ! transactionChanges . routes ?. route0 ?. geometry ?. coordinates ?. length ;
1285- const shouldClearRoutes = ( haveWaypointsActuallyChanged || hasModifiedDistanceRate ) && ! hasValidOptimisticRoute ;
1285+ const shouldClearRoutes = ( hasWaypointAddressesChanged || hasModifiedDistanceRate ) && ! hasValidOptimisticRoute ;
12861286 successData . push ( {
12871287 onyxMethod : Onyx . METHOD . MERGE ,
12881288 key : `${ ONYXKEYS . COLLECTION . TRANSACTION } ${ transactionID } ` ,
0 commit comments