diff --git a/packages/sanity/src/core/form/inputs/PortableText/object/modals/ObjectEditModal.tsx b/packages/sanity/src/core/form/inputs/PortableText/object/modals/ObjectEditModal.tsx index 557f43c1a83..4130ba79191 100644 --- a/packages/sanity/src/core/form/inputs/PortableText/object/modals/ObjectEditModal.tsx +++ b/packages/sanity/src/core/form/inputs/PortableText/object/modals/ObjectEditModal.tsx @@ -42,7 +42,7 @@ export function ObjectEditModal(props: { onClose() }, [onClose]) - const modalWidth = schemaModalOption?.width || 1 + const modalWidth = schemaModalOption?.width if (modalType === 'popover') { return ( diff --git a/packages/sanity/src/core/form/inputs/PortableText/object/modals/PopoverModal.tsx b/packages/sanity/src/core/form/inputs/PortableText/object/modals/PopoverModal.tsx index d7529594b84..f0b99b953c4 100644 --- a/packages/sanity/src/core/form/inputs/PortableText/object/modals/PopoverModal.tsx +++ b/packages/sanity/src/core/form/inputs/PortableText/object/modals/PopoverModal.tsx @@ -25,7 +25,7 @@ interface PopoverEditDialogProps { const POPOVER_FALLBACK_PLACEMENTS: PopoverProps['fallbackPlacements'] = ['top', 'bottom'] export function PopoverEditDialog(props: PopoverEditDialogProps) { - const {floatingBoundary, referenceBoundary, referenceElement, width = 0} = props + const {floatingBoundary, referenceBoundary, referenceElement, width = 1} = props const [open, setOpen] = useState(false) // This hook is here to set open after the initial render.