@thefittingroom/shop-ui 1.2.3 → 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.3 (2024-06-20T18:12:34.387Z)
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.10 (2024-06-20T18:11:48.643Z)
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,9 +23010,12 @@ class TfrShop {
23010
23010
  });
23011
23011
  }
23012
23012
  async getStyleByBrandStyleId(brandStyleId) {
23013
+ var _a, _b;
23013
23014
  try {
23014
- const querySnapshot = await this.firebase.getDocs('styles', [rl('brand_style_id', '==', brandStyleId)]);
23015
- return querySnapshot.docs[0].data();
23015
+ const constraints = [rl('brand_id', '==', this.brandId)];
23016
+ constraints.push(rl('brand_style_id', '==', brandStyleId));
23017
+ const querySnapshot = await this.firebase.getDocs('styles', constraints);
23018
+ return (_b = (_a = querySnapshot.docs) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.data();
23016
23019
  }
23017
23020
  catch (error) {
23018
23021
  return getFirebaseError(error);
@@ -36777,7 +36780,7 @@ class FittingRoom {
36777
36780
  }
36778
36781
  async checkIfPublished(brandStyleId) {
36779
36782
  const style = await this.tfrShop.getStyleByBrandStyleId(brandStyleId);
36780
- return style.is_published;
36783
+ return Boolean(style === null || style === void 0 ? void 0 : style.is_published);
36781
36784
  }
36782
36785
  setSku(sku) {
36783
36786
  this.tfrSizeRec.setSku(sku);