sanity 3.70.1-corel.541 → 3.70.1-corel.544

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5841,9 +5841,9 @@ const DocumentPaneProvider = React.memo((props) => {
5841
5841
  throw new Error("Attempted to patch the Sanity document during initial render or in an `useInsertionEffect`. Input components should only call `onChange()` in a useEffect or an event handler.");
5842
5842
  }), handleChange = React.useCallback((event) => patchRef.current(event), []);
5843
5843
  React.useInsertionEffect(() => {
5844
- readOnly && (patchRef.current = () => {
5844
+ readOnly ? patchRef.current = () => {
5845
5845
  throw new Error("Attempted to patch a read-only document");
5846
- }), patchRef.current = (event_0) => {
5846
+ } : patchRef.current = (event_0) => {
5847
5847
  !editState.draft && !editState.published && telemetry2.log(CreatedDraft), patch.execute(sanity.toMutationPatches(event_0.patches), initialValue.value);
5848
5848
  };
5849
5849
  }, [editState.draft, editState.published, initialValue.value, patch, telemetry2, readOnly]);