geojson-path-finder
Advanced tools
Comparing version 2.0.2-0 to 2.0.2-1
@@ -49,3 +49,4 @@ "use strict"; | ||
const edges = Object.keys(vertex); | ||
if (shouldCompact(vertices, vertexKey)) { | ||
if (shouldCompact(sourceVertices, vertexKey) && | ||
shouldCompact(vertices, vertexKey)) { | ||
for (const neighborKey of edges) { | ||
@@ -52,0 +53,0 @@ for (const otherNeighborKey of edges) { |
@@ -46,3 +46,4 @@ /** | ||
const edges = Object.keys(vertex); | ||
if (shouldCompact(vertices, vertexKey)) { | ||
if (shouldCompact(sourceVertices, vertexKey) && | ||
shouldCompact(vertices, vertexKey)) { | ||
for (const neighborKey of edges) { | ||
@@ -49,0 +50,0 @@ for (const otherNeighborKey of edges) { |
{ | ||
"name": "geojson-path-finder", | ||
"version": "2.0.2-0", | ||
"version": "2.0.2-1", | ||
"description": "Find shortest path through a network of GeoJSON", | ||
@@ -5,0 +5,0 @@ "repository": "git@github.com:perliedman/geojson-path-finder.git", |
@@ -71,3 +71,6 @@ import { Position } from "@turf/helpers"; | ||
if (shouldCompact(vertices, vertexKey)) { | ||
if ( | ||
shouldCompact(sourceVertices, vertexKey) && | ||
shouldCompact(vertices, vertexKey) | ||
) { | ||
for (const neighborKey of edges) { | ||
@@ -74,0 +77,0 @@ for (const otherNeighborKey of edges) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
477958
8584