fix: content edit

This commit is contained in:
hexastack 2025-02-03 10:39:06 +01:00
parent 1b5b759549
commit 83424d883a

View File

@ -6,7 +6,6 @@
* 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file).
*/ */
import LinkIcon from "@mui/icons-material/Link"; import LinkIcon from "@mui/icons-material/Link";
import { import {
Dialog, Dialog,
@ -238,7 +237,9 @@ export const ContentDialog: FC<ContentDialogProps> = ({
name={contentField.name} name={contentField.name}
control={control} control={control}
defaultValue={ defaultValue={
content ? content["dynamicFields"][contentField.name] : null content && content["dynamicFields"]
? content["dynamicFields"][contentField.name]
: null
} }
rules={ rules={
contentField.name === "title" contentField.name === "title"