@whiplashmerch/whiplash-api-client 1.0.45 → 1.0.46

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.
@@ -26356,9 +26356,17 @@ const getApiV21LotsExtended = (client, params, options, perPage = 25) => {
26356
26356
  }
26357
26357
  let lots = [];
26358
26358
  return new Promise((resolve, reject) => getApiV21Lots(client, params)
26359
- .then(response => loadRelatedObjects(client, response, configuration, perPage))
26359
+ .then(response => {
26360
+ if (response.length === 0) {
26361
+ return [];
26362
+ }
26363
+ return loadRelatedObjects(client, response, configuration, perPage);
26364
+ })
26360
26365
  .then((response) => {
26361
26366
  lots = response;
26367
+ if (lots.length === 0) {
26368
+ return [];
26369
+ }
26362
26370
  return loadRelatedObjects(client, response.flatMap(x => x.locations), locationConfiguration, perPage);
26363
26371
  })
26364
26372
  .then(() => {