Browse Source

fix(admin-ui): Fix error with FacetValue localeString custom field

Fixes #1442
Michael Bromley 3 years ago
parent
commit
80ef31ad56

+ 1 - 1
packages/admin-ui/src/lib/catalog/src/components/facet-detail/facet-detail.component.ts

@@ -330,7 +330,7 @@ export class FacetDetailComponent
                         const key = fieldDef.name;
                         const fieldValue =
                             fieldDef.type === 'localeString'
-                                ? (valueTranslation as any).customFields[key]
+                                ? (valueTranslation as any | undefined)?.customFields?.[key]
                                 : (value as any).customFields[key];
                         const control = customValueFieldsGroup.get(key);
                         if (control) {