@mapbox/mapbox-sdk
Advanced tools
Comparing version 0.15.2 to 0.15.3
{ | ||
"name": "@mapbox/mapbox-sdk", | ||
"version": "0.15.2", | ||
"version": "0.15.3", | ||
"description": "JS SDK for accessing Mapbox APIs", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -106,3 +106,3 @@ 'use strict'; | ||
expect(error.message).toMatch( | ||
'waypoints must include between 2 and 12 OptimizationWaypoints' | ||
'waypoints must include at least 2 OptimizationWaypoints' | ||
); | ||
@@ -109,0 +109,0 @@ } |
@@ -24,3 +24,3 @@ 'use strict'; | ||
* @param {'driving'|'driving-traffic'|'walking'|'cycling'} [config.profile="driving"] | ||
* @param {Array<OptimizationWaypoint>} config.waypoints - An ordered array of [`OptimizationWaypoint`](#optimizationwaypoint) objects, between 2 and 12 (inclusive). | ||
* @param {Array<OptimizationWaypoint>} config.waypoints - An ordered array of [`OptimizationWaypoint`](#optimizationwaypoint) objects, with at least 2 | ||
* @param {Array<'duration'|'distance'|'speed'>} [config.annotations] - Specify additional metadata that should be returned. | ||
@@ -76,5 +76,5 @@ * @param {'any'|'last'} [config.destination="any"] - Returned route ends at `any` or `last` coordinate. | ||
var waypointCount = config.waypoints.length; | ||
if (waypointCount < 2 || waypointCount > 12) { | ||
if (waypointCount < 2) { | ||
throw new Error( | ||
'waypoints must include between 2 and 12 OptimizationWaypoints' | ||
'waypoints must include at least 2 OptimizationWaypoints' | ||
); | ||
@@ -81,0 +81,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
574455