Skip to content

Commit

Permalink
Merge pull request #874 from stadtnavi/fix/itinerary-list-wrong-entries
Browse files Browse the repository at this point in the history
fix(itinerary-list): contains non transit entries
  • Loading branch information
andreashelms authored Jan 13, 2025
2 parents d0bbff3 + 30abb95 commit d6e08db
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion app/component/ItineraryPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,11 @@ class ItineraryPage extends React.Component {
]),
};

const parkRidePlan = {
...result.parkRidePlan,
itineraries: transitItineraries(result.parkRidePlan.itineraries),
};

this.setState(
{
loadingAlt: false,
Expand All @@ -324,7 +329,7 @@ class ItineraryPage extends React.Component {
scooterRentAndPublicPlan: result.scooterRentAndPublicPlan,
carPlan: result.carPlan,
carRentalPlan: result.carRentalPlan,
parkRidePlan: result.parkRidePlan,
parkRidePlan,
onDemandTaxiPlan: result.onDemandTaxiPlan,
},
() => {
Expand Down
3 changes: 2 additions & 1 deletion app/component/StreetModeSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ export const StreetModeSelector = ({
...(bikeParkPlan?.itineraries || []),
...(bikeAndPublicPlan?.itineraries || []),
...(bikeRentAndPublicPlan?.itineraries || []),
],
].filter(itinerary => itinerary.legs.some(l => l.transitLeg)),
}
: {};

const carRentalOrOwn = !loading
? {
itineraries: [
Expand Down

0 comments on commit d6e08db

Please sign in to comment.