turf-common 1.2.1-beta.66 → 1.2.1-beta.67

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.
@@ -179,10 +179,10 @@ var TurfAvailability = /** @class */ (function () {
179
179
  return "event#".concat(this.dateCodes[0]).concat(this.dateCodes[this.dateCodes.length - 1], "#").concat(this.timeSlotCodesDateWise[this.dateCodes[0]][0].slice(0, 4)).concat(this.timeSlotCodesDateWise[this.dateCodes[0]][this.timeSlotCodesDateWise[this.dateCodes[0]].length - 1].slice(4, 8), "#").concat(this.getPitchIds(), "#").concat(this.weekDays);
180
180
  };
181
181
  TurfAvailability.prototype.parse = function () {
182
+ if (!Object.keys(this.data).length)
183
+ return;
182
184
  var eventCode = this.getCode();
183
185
  var eventCodes = eventCode.split("#");
184
- if (!eventCodes.length)
185
- return;
186
186
  var dateCodeRange = eventCodes[1];
187
187
  var timeCodeRange = eventCodes[2];
188
188
  this.pitchCodes = eventCodes[3].split(",").map(function (id) { return id.padStart(2, "0"); });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "turf-common",
3
- "version": "1.2.1-beta.66",
3
+ "version": "1.2.1-beta.67",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",