Skip to content

Commit

Permalink
Merge pull request Expensify#46741 from etCoderDysto/add-stop-main
Browse files Browse the repository at this point in the history
fix: Don't show "Add stop" button when start and stop ways points are not entered
  • Loading branch information
neil-marcellini authored Aug 5, 2024
2 parents 8cfeb33 + 0d377e0 commit 412fc60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/DistanceRequest/DistanceRequestFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function DistanceRequestFooter({waypoints, transaction, mapboxAccessToken, navig
const {translate} = useLocalize();

const numberOfWaypoints = Object.keys(waypoints ?? {}).length;
const numberOfFilledWaypoints = Object.values(waypoints ?? {}).filter((waypoint) => Object.keys(waypoint).length).length;
const numberOfFilledWaypoints = Object.values(waypoints ?? {}).filter((waypoint) => waypoint?.address).length;
const lastWaypointIndex = numberOfWaypoints - 1;

const getMarkerComponent = useCallback(
Expand Down

0 comments on commit 412fc60

Please sign in to comment.