Skip to content

Commit 1bdc11b

Browse files
committed
bug fix
1 parent 7753613 commit 1bdc11b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/layers/UsePathsLayer.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ function addAccessNetworkLayer(map: Map, selectedPath: Path, queryPoints: QueryP
133133
})
134134
layer.setStyle(style)
135135
for (let i = 0; i < selectedPath.snapped_waypoints.coordinates.length; i++) {
136+
if(i >= queryPoints.length) break // can happen if deleted too fast
136137
const start = fromLonLat([queryPoints[i].coordinate.lng, queryPoints[i].coordinate.lat])
137138
const end = fromLonLat(selectedPath.snapped_waypoints.coordinates[i])
138139
layer.getSource()?.addFeature(new Feature(createBezierLineString(start, end)))

0 commit comments

Comments
 (0)