Skip to content

Commit

Permalink
fix the duration and distance values (#271) (h/t @YuChunTsao)
Browse files Browse the repository at this point in the history
  • Loading branch information
YuChunTsao authored Dec 8, 2022
1 parent 700e581 commit c1dab32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/controls/instructions.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ export default class Instructions {
routes: directions.length,
steps: direction.legs[0].steps, // Todo: Respect all legs,
format: utils.format[unit],
duration: utils.format[unit](direction.distance),
distance: utils.format.duration(direction.duration)
duration: utils.format.duration(direction.duration),
distance: utils.format[unit](direction.distance)
});

const steps = this.container.querySelectorAll('.mapbox-directions-step');
Expand Down

0 comments on commit c1dab32

Please sign in to comment.