mts-booking-library 1.2.6 → 1.2.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -272,13 +272,13 @@ var JourneyBooking = /** @class */ (function (_super) {
272
272
  ];
273
273
  }));
274
274
  // Parse the return tariffs
275
- passenger.returnTariffs = new Map(Object.entries(passenger.returnTariffs).map(function (_a) {
275
+ passenger.returnTariffs = passenger.returnTariffs ? new Map(Object.entries(passenger.returnTariffs).map(function (_a) {
276
276
  var tripId = _a[0], tariffs = _a[1];
277
277
  return [
278
278
  +tripId,
279
279
  tariffs
280
280
  ];
281
- }));
281
+ })) : null;
282
282
  });
283
283
  return {
284
284
  buyerDataStatus: response.buyerDataStatus,
@@ -321,13 +321,13 @@ var SubscriptionBooking = /** @class */ (function (_super) {
321
321
  ];
322
322
  }));
323
323
  // Parse the return tariffs
324
- passenger.returnTariffs = new Map(Object.entries(passenger.returnTariffs).map(function (_a) {
324
+ passenger.returnTariffs = passenger.returnTariffs ? new Map(Object.entries(passenger.returnTariffs).map(function (_a) {
325
325
  var tripId = _a[0], tariffs = _a[1];
326
326
  return [
327
327
  +tripId,
328
328
  tariffs
329
329
  ];
330
- }));
330
+ })) : null;
331
331
  });
332
332
  return {
333
333
  buyerDataStatus: response.buyerDataStatus,
@@ -30,7 +30,7 @@ export declare const initializePerson: (person?: Person | undefined | null) => P
30
30
  */
31
31
  export type GetPassenger = Person & {
32
32
  outboundTariffs: Map<number, PassengerTariff[]>;
33
- returnTariffs: Map<number, PassengerTariff[]>;
33
+ returnTariffs: Map<number, PassengerTariff[]> | null;
34
34
  };
35
35
  export declare enum BuyerDataStatus {
36
36
  OPTIONAL = 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mts-booking-library",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
4
4
  "description": "Library for use MyTicketSolution Booking API",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",