Skip to content

Commit 30abb95

Browse files
Andreas HelmsAndreas Helms
authored andcommitted
fix(itinerary-list): contains non transit entries
1 parent 6f1b401 commit 30abb95

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

app/component/ItineraryPage.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,11 @@ class ItineraryPage extends React.Component {
313313
]),
314314
};
315315

316+
const parkRidePlan = {
317+
...result.parkRidePlan,
318+
itineraries: transitItineraries(result.parkRidePlan.itineraries),
319+
};
320+
316321
this.setState(
317322
{
318323
loadingAlt: false,
@@ -324,7 +329,7 @@ class ItineraryPage extends React.Component {
324329
scooterRentAndPublicPlan: result.scooterRentAndPublicPlan,
325330
carPlan: result.carPlan,
326331
carRentalPlan: result.carRentalPlan,
327-
parkRidePlan: result.parkRidePlan,
332+
parkRidePlan,
328333
onDemandTaxiPlan: result.onDemandTaxiPlan,
329334
},
330335
() => {

app/component/StreetModeSelector.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@ export const StreetModeSelector = ({
5151
...(bikeParkPlan?.itineraries || []),
5252
...(bikeAndPublicPlan?.itineraries || []),
5353
...(bikeRentAndPublicPlan?.itineraries || []),
54-
],
54+
].filter(itinerary => itinerary.legs.some(l => l.transitLeg)),
5555
}
5656
: {};
57+
5758
const carRentalOrOwn = !loading
5859
? {
5960
itineraries: [

0 commit comments

Comments
 (0)