changed directions to walking / public transport

This commit is contained in:
Martin Donnelly 2018-10-11 17:26:19 +01:00
parent eb9c2e3762
commit 0b10d76c20

View File

@ -22,7 +22,7 @@ function reduceEstDirections(body = '') {
obj.totalTime = parseFloat(get(directions, 'total_time'));
obj.totalTimeWithTraffic = parseFloat(get(directions, 'total_time_with_traffic'));
obj.readable = humanizeDuration(obj.totalTimeWithTraffic * 60 * 1000);
obj.readable = humanizeDuration((obj.totalTimeWithTraffic !== 0 ? obj.totalTimeWithTraffic : obj.totalTime) * 60 * 1000);
obj.timePercentage = ((obj.totalTime * ( obj.totalTimeWithTraffic / 100 )) + obj.totalTime) - 100;