New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

furkot-directions

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

furkot-directions - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3

1.2.3 / 2019-07-02
==================
* fix result of openrouteservice when there is no road
1.2.2 / 2019-06-03

@@ -3,0 +8,0 @@ ==================

@@ -28,6 +28,6 @@ const { pathType } = require("../../model");

segments.push({
duration: Math.round(duration || 0),
distance: Math.round(distance || 0),
path: path && path.slice(way_points[0], way_points[1]),
instructions: instruction
duration: Math.round(duration || 0),
distance: Math.round(distance || 0),
path: path && path.slice(way_points[0], way_points[1]),
instructions: instruction
});

@@ -44,2 +44,5 @@ return result;

};
if (!(route.duration || route.distance || (route.path && route.path.length > 1))) {
route.path = [];
}
if (segments) {

@@ -51,3 +54,9 @@ route.segmentIndex = segments.length;

steps.reduce(extractStep, result);
if (segments.length) {
if (segments.length === 1) {
const seg = segments[0];
if (!(seg.duration || seg.distance || (seg.path && seg.path.length > 1))) {
seg.path = [];
}
}
if (segments.length && route.path.length) {
util.last(segments).path.push(util.last(route.path));

@@ -54,0 +63,0 @@ }

{
"name": "furkot-directions",
"version": "1.2.2",
"version": "1.2.3",
"description": "Directions service for Furkot",

@@ -5,0 +5,0 @@ "author": {