@wemap/routers 12.8.6-alpha.0 → 12.8.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3271,7 +3271,7 @@ class GeoveloRemoteRouter extends RemoteRouter {
3271
3271
  const jsonResponse = await res.json().catch(() => {
3272
3272
  throw RemoteRoutingError.responseNotParsing(this.rname, url.toString());
3273
3273
  });
3274
- if (jsonResponse && jsonResponse.length === 0) {
3274
+ if (!jsonResponse || jsonResponse.length === 0) {
3275
3275
  throw RemoteRoutingError.notFound(this.rname, "No itineraries found.");
3276
3276
  }
3277
3277
  const itineraries = this.parseResponse(jsonResponse);
@@ -3328,7 +3328,6 @@ class GeoveloRemoteRouter extends RemoteRouter {
3328
3328
  return acc;
3329
3329
  }, []);
3330
3330
  const stepsBuilder = new StepsBuilder().setStart(from).setEnd(to).setPathCoords(legCoords);
3331
- let transportInfo;
3332
3331
  const transitMode = transitModeCorrespondance$1.get(section.transportMode);
3333
3332
  const unpackedIntructions = unpackJSON(section.details.instructions);
3334
3333
  for (const instruction of unpackedIntructions) {
@@ -3353,7 +3352,6 @@ class GeoveloRemoteRouter extends RemoteRouter {
3353
3352
  coords: to
3354
3353
  },
3355
3354
  coords: legCoords,
3356
- transportInfo,
3357
3355
  steps: stepsBuilder.build()
3358
3356
  });
3359
3357
  legs.push(leg);