@thefittingroom/shop-ui 1.2.4 → 1.2.5

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/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * thefittingroom v1.2.4 (2024-06-20T18:21:11.579Z)
2
+ * thefittingroom v1.2.5 (2024-06-20T18:23:12.499Z)
3
3
  * Copyright 2022-present, TheFittingRoom, Inc. All rights reserved.
4
4
  */
5
5
  function loadImageRecursive(imageURL, imageURLs) {
@@ -47,7 +47,7 @@ const InitImageSlider = (sliderID, onChange) => {
47
47
  };
48
48
 
49
49
  /*!
50
- * thefittingroom v1.1.11 (2024-06-20T18:20:57.355Z)
50
+ * thefittingroom v1.1.12 (2024-06-20T18:22:43.617Z)
51
51
  * Copyright 2022-present, TheFittingRoom, Inc. All rights reserved.
52
52
  */
53
53
 
@@ -23010,11 +23010,12 @@ class TfrShop {
23010
23010
  });
23011
23011
  }
23012
23012
  async getStyleByBrandStyleId(brandStyleId) {
23013
+ var _a, _b;
23013
23014
  try {
23014
23015
  const constraints = [rl('brand_id', '==', this.brandId)];
23015
23016
  constraints.push(rl('brand_style_id', '==', brandStyleId));
23016
23017
  const querySnapshot = await this.firebase.getDocs('styles', constraints);
23017
- return querySnapshot.docs[0].data();
23018
+ return (_b = (_a = querySnapshot.docs) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.data();
23018
23019
  }
23019
23020
  catch (error) {
23020
23021
  return getFirebaseError(error);
@@ -36779,7 +36780,7 @@ class FittingRoom {
36779
36780
  }
36780
36781
  async checkIfPublished(brandStyleId) {
36781
36782
  const style = await this.tfrShop.getStyleByBrandStyleId(brandStyleId);
36782
- return style.is_published;
36783
+ return Boolean(style === null || style === void 0 ? void 0 : style.is_published);
36783
36784
  }
36784
36785
  setSku(sku) {
36785
36786
  this.tfrSizeRec.setSku(sku);