The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
[fix] Handle null icon for field metadata (#14565)
Marie53b853f877c4
diff --git a/packages/twenty-front/src/modules/object-metadata/validation-schemas/fieldMetadataItemSchema.ts b/packages/twenty-front/src/modules/object-metadata/validation-schemas/fieldMetadataItemSchema.tsindex 32959c7a77c..674bf4ae7e5 100644--- a/packages/twenty-front/src/modules/object-metadata/validation-schemas/fieldMetadataItemSchema.ts+++ b/packages/twenty-front/src/modules/object-metadata/validation-schemas/fieldMetadataItemSchema.ts@@ -12,7 +12,10 @@ export const fieldMetadataItemSchema = (existingLabels?: string[]) => {createdAt: z.string().datetime(),defaultValue: z.any().optional(),description: z.string().trim().nullable().optional(),- icon: z.string().startsWith('Icon').trim().nullable(),+ icon: z+ .union([z.string().startsWith('Icon').trim(), z.literal('')])+ .nullable()+ .optional(),id: z.string().uuid(),isActive: z.boolean(),isCustom: z.boolean(),