mobility-toolbox-js 1.4.3 → 1.4.4

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.
@@ -491,8 +491,15 @@ class TralisAPI {
491
491
  this.conn.get(
492
492
  params,
493
493
  (data) => {
494
- // Remove the delay from arrivalTime nnd departureTime
495
- resolve(cleanStopTime(data.content && data.content[0]));
494
+ if (data.content && data.content.length) {
495
+ const content = data.content.map((stopSequence) => {
496
+ return cleanStopTime(stopSequence);
497
+ });
498
+
499
+ // Remove the delay from arrivalTime and departureTime
500
+ resolve(content);
501
+ }
502
+ resolve([]);
496
503
  },
497
504
  (err) => {
498
505
  reject(err);