@gem-sdk/core 2.1.27-staging.14 → 2.1.27-staging.17

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.
@@ -75,15 +75,14 @@ const getProductOptionsLabelByName = (options, name)=>{
75
75
  const labels = [];
76
76
  const optionByName = options.find((op)=>op.name === name);
77
77
  optionByName?.values.forEach((val)=>{
78
- labels.push(val.label ?? '');
78
+ if (val.label && !labels.includes(val.label)) labels.push(val.label);
79
79
  });
80
80
  return labels;
81
81
  };
82
82
  const getSwatchesOptionsLabel = (options)=>{
83
83
  const labels = [];
84
84
  options.forEach((op)=>{
85
- labels.push(op.label ?? '');
86
- return;
85
+ if (op.label && !labels.includes(op.label)) labels.push(op.label);
87
86
  });
88
87
  return labels;
89
88
  };
@@ -71,15 +71,14 @@ const getProductOptionsLabelByName = (options, name)=>{
71
71
  const labels = [];
72
72
  const optionByName = options.find((op)=>op.name === name);
73
73
  optionByName?.values.forEach((val)=>{
74
- labels.push(val.label ?? '');
74
+ if (val.label && !labels.includes(val.label)) labels.push(val.label);
75
75
  });
76
76
  return labels;
77
77
  };
78
78
  const getSwatchesOptionsLabel = (options)=>{
79
79
  const labels = [];
80
80
  options.forEach((op)=>{
81
- labels.push(op.label ?? '');
82
- return;
81
+ if (op.label && !labels.includes(op.label)) labels.push(op.label);
83
82
  });
84
83
  return labels;
85
84
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "2.1.27-staging.14",
3
+ "version": "2.1.27-staging.17",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",