Fix summary generation when empty strings are present.
Also corrects step ordering when steps have equal durations.
This commit is contained in:
committed by
Patrick Niklaus
parent
aab1aad8f4
commit
f251f93a11
@@ -71,6 +71,7 @@ module.exports = function () {
|
||||
r.status = res.statusCode === 200 ? 'x' : null;
|
||||
if (r.status) {
|
||||
r.route = this.wayList(r.json.routes[0]);
|
||||
r.summary = r.json.routes[0].legs.map(l => l.summary).join(',');
|
||||
|
||||
if (r.route.split(',')[0] === util.format('w%d', i)) {
|
||||
r.time = r.json.routes[0].duration;
|
||||
|
||||
Reference in New Issue
Block a user