@wix/headless-stores 0.0.102 → 0.0.104

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.
@@ -412,14 +412,14 @@ export const ProductListService = implementService.withConfig()(ProductsListServ
412
412
  };
413
413
  });
414
414
  function getMinPrice(aggregationData) {
415
- const minPriceAggregation = aggregationData.find((data) => data.fieldPath === 'actualPriceRange.minValue.amount');
415
+ const minPriceAggregation = aggregationData?.find((data) => data.fieldPath === 'actualPriceRange.minValue.amount');
416
416
  if (minPriceAggregation?.scalar?.value) {
417
417
  return Number(minPriceAggregation.scalar.value) || 0;
418
418
  }
419
419
  return 0;
420
420
  }
421
421
  function getMaxPrice(aggregationData) {
422
- const maxPriceAggregation = aggregationData.find((data) => data.fieldPath === 'actualPriceRange.maxValue.amount');
422
+ const maxPriceAggregation = aggregationData?.find((data) => data.fieldPath === 'actualPriceRange.maxValue.amount');
423
423
  if (maxPriceAggregation?.scalar?.value) {
424
424
  return Number(maxPriceAggregation.scalar.value) || 0;
425
425
  }
@@ -412,14 +412,14 @@ export const ProductListService = implementService.withConfig()(ProductsListServ
412
412
  };
413
413
  });
414
414
  function getMinPrice(aggregationData) {
415
- const minPriceAggregation = aggregationData.find((data) => data.fieldPath === 'actualPriceRange.minValue.amount');
415
+ const minPriceAggregation = aggregationData?.find((data) => data.fieldPath === 'actualPriceRange.minValue.amount');
416
416
  if (minPriceAggregation?.scalar?.value) {
417
417
  return Number(minPriceAggregation.scalar.value) || 0;
418
418
  }
419
419
  return 0;
420
420
  }
421
421
  function getMaxPrice(aggregationData) {
422
- const maxPriceAggregation = aggregationData.find((data) => data.fieldPath === 'actualPriceRange.maxValue.amount');
422
+ const maxPriceAggregation = aggregationData?.find((data) => data.fieldPath === 'actualPriceRange.maxValue.amount');
423
423
  if (maxPriceAggregation?.scalar?.value) {
424
424
  return Number(maxPriceAggregation.scalar.value) || 0;
425
425
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/headless-stores",
3
- "version": "0.0.102",
3
+ "version": "0.0.104",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -66,7 +66,7 @@
66
66
  "@wix/auto_sdk_stores_read-only-variants-v-3": "^1.0.23",
67
67
  "@wix/ecom": "^1.0.1461",
68
68
  "@wix/essentials": "^0.1.24",
69
- "@wix/headless-ecom": "0.0.36",
69
+ "@wix/headless-ecom": "0.0.37",
70
70
  "@wix/headless-media": "0.0.18",
71
71
  "@wix/headless-utils": "0.0.8",
72
72
  "@wix/redirects": "^1.0.83",
@@ -86,5 +86,5 @@
86
86
  "groupId": "com.wixpress.headless-components"
87
87
  }
88
88
  },
89
- "falconPackageHash": "f1ed038a37653b2a27be63646a53cf63ced6ed4c7e4e9d042191dccb"
89
+ "falconPackageHash": "06c8b114cd10bf81e0aac903d34ccd77aaab45f2c0ae2e5977402e8a"
90
90
  }