Merge branch 'main' into 538-issue-user-module-strictnullchecks-issues

This commit is contained in:
yassinedorbozgithub 2025-01-09 09:14:59 +01:00
commit 3c1f115a7c
2 changed files with 3 additions and 5 deletions

View File

@ -234,9 +234,7 @@ export const ContentDialog: FC<ContentDialogProps> = ({
name={contentField.name} name={contentField.name}
control={control} control={control}
defaultValue={ defaultValue={
content content ? content["dynamicFields"][contentField.name] : null
? content?.["dynamicFields"]?.[contentField.name]
: null
} }
rules={ rules={
contentField.name === "title" contentField.name === "title"

View File

@ -15,13 +15,13 @@ export interface IContentAttributes {
entity: string; entity: string;
title: string; title: string;
status: boolean; status: boolean;
dynamicFields?: Record<string, any>; dynamicFields: Record<string, any>;
} }
export interface IContentStub extends IBaseSchema { export interface IContentStub extends IBaseSchema {
title: string; title: string;
status: boolean; status: boolean;
dynamicFields?: Record<string, any>; dynamicFields: Record<string, any>;
} }
export interface IContent extends IContentStub, IFormat<Format.BASIC> { export interface IContent extends IContentStub, IFormat<Format.BASIC> {