@reactionary/provider-commercetools 0.0.77 → 0.0.78

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/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@reactionary/provider-commercetools",
3
- "version": "0.0.77",
3
+ "version": "0.0.78",
4
4
  "main": "index.js",
5
5
  "types": "src/index.d.ts",
6
6
  "dependencies": {
7
- "@reactionary/core": "0.0.77",
7
+ "@reactionary/core": "0.0.78",
8
8
  "debug": "^4.4.3",
9
9
  "zod": "4.1.9",
10
10
  "@commercetools/ts-client": "^4.2.1",
@@ -121,13 +121,16 @@ class CommercetoolsProductProvider extends ProductProvider {
121
121
  if (attr.value && Array.isArray(attr.value)) {
122
122
  attrValue = attr.value[0];
123
123
  }
124
- if (attrValue && typeof attrValue === "object") {
125
- if (this.context.languageContext.locale in attrValue) {
126
- attrValue = attrValue[this.context.languageContext.locale];
124
+ if (attr.value && typeof attr.value === "object") {
125
+ if (this.context.languageContext.locale in attr.value) {
126
+ attrValue = attr.value[this.context.languageContext.locale];
127
127
  } else {
128
128
  attrValue = "-";
129
129
  }
130
130
  }
131
+ if (typeof attr.value === "string") {
132
+ attrValue = attr.value;
133
+ }
131
134
  const attrVal = ProductAttributeValueSchema.parse({
132
135
  identifier: ProductAttributeValueIdentifierSchema.parse({
133
136
  key: attrValue