@nuskin/ns-product-lib 2.10.2-cx24-5155.2 → 2.10.2-cx24-5155.4

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [2.10.2-cx24-5155.4](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.10.2-cx24-5155.3...v2.10.2-cx24-5155.4) (2023-09-14)
2
+
3
+
4
+ ### Fix
5
+
6
+ * filter child sku to get BO date for BO sku only (#CX24-5155) ([160eccf](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/160eccff4d409864677288350f810ae40992d571)), closes [#CX24-5155](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-5155)
7
+
8
+ ## [2.10.2-cx24-5155.3](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.10.2-cx24-5155.2...v2.10.2-cx24-5155.3) (2023-09-13)
9
+
10
+
11
+ ### Fix
12
+
13
+ * product kit/bundle inventory empty (#CX24-5155) ([f79485d](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/f79485dd004ab608e5d54ff74377b570347d9f4c)), closes [#CX24-5155](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-5155)
14
+
1
15
  ## [2.10.2-cx24-5155.2](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.10.2-cx24-5155.1...v2.10.2-cx24-5155.2) (2023-09-13)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "2.10.2-cx24-5155.2",
3
+ "version": "2.10.2-cx24-5155.4",
4
4
  "description": "This project contains shared Product models and code between the backend and frontend.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -168,7 +168,7 @@ const ProductData = {
168
168
 
169
169
  //return max epoch time since childSkus already mapped in fetchChildSkus
170
170
  if (product.childSkus.some(sku => sku.inventory && sku.inventory.backOrderDate)) {
171
- return Math.max(...product.childSkus.map(sku => (sku.inventory && sku.inventory.backOrderDate) || 0));
171
+ return Math.max(...product.childSkus.filter(sku => sku.inventory && sku.inventory.backOrdered).map(sku => (sku.inventory && sku.inventory.backOrderDate) || 0));
172
172
  }
173
173
  }
174
174