Jelajahi Sumber

fix(admin-ui): Fix localeString error when creating Product

Fixes #1378
Michael Bromley 4 tahun lalu
induk
melakukan
e7013d0703

+ 1 - 1
packages/admin-ui/src/lib/core/src/common/base-detail.component.ts

@@ -127,7 +127,7 @@ export abstract class BaseDetailComponent<Entity extends { id: string; updatedAt
             const key = fieldDef.name;
             const value =
                 fieldDef.type === 'localeString'
-                    ? (currentTranslation as any).customFields?.[key]
+                    ? (currentTranslation as any)?.customFields?.[key]
                     : (entity as any).customFields?.[key];
             const control = formGroup?.get(key);
             if (control) {