Skip to content

Commit

Permalink
Merge pull request #2351 from HSLdevcom/DT-2687
Browse files Browse the repository at this point in the history
Search Earlier routes with 'Arrive By' option now works correctly
  • Loading branch information
optionsome authored Jun 20, 2018
2 parents 788adbf + 4a8c134 commit 06afc37
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/component/SummaryPlanContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ class SummaryPlanContainer extends React.Component {
};

onEarlier = () => {
this.props.setLoading(true);
const start = moment.unix(this.props.serviceTimeRange.start);

const earliestArrivalTime = this.props.itineraries.reduce(
Expand All @@ -184,7 +183,7 @@ class SummaryPlanContainer extends React.Component {

earliestArrivalTime.subtract(1, 'minutes');

if (this.context.location.query.arriveBy === true) {
if (this.context.location.query.arriveBy === 'true') {
// user has arriveBy already
this.context.router.replace({
...this.context.location,
Expand All @@ -194,6 +193,8 @@ class SummaryPlanContainer extends React.Component {
},
});
} else {
this.props.setLoading(true);

const params = preparePlanParams(this.props.config)(
this.context.router.params,
this.context,
Expand Down

0 comments on commit 06afc37

Please sign in to comment.