Skip to content

Conversation

@richhiggins
Copy link
Contributor

@richhiggins richhiggins commented Dec 9, 2025

Description

Fixes a bug where a patch is attempted when creating a new document and the document is not in an editable state resulting in error message Attempted to patch a read-only document.

Adds a readonly prop & checks for the readonly status of the current document.

What to review

Added prop:
https://github.com/sanity-io/sanity-plugin-internationalized-array/pull/109/files#diff-d3dc0e2098712407c1b56260dd28c115ed41e34a1ebac935b86887f19292e263R38

Added check:
https://github.com/sanity-io/sanity-plugin-internationalized-array/pull/109/files#diff-d3dc0e2098712407c1b56260dd28c115ed41e34a1ebac935b86887f19292e263R128

Testing

Tested manually in local studio v4.20.3.

@richhiggins richhiggins requested a review from stipsan December 9, 2025 15:01
@richhiggins richhiggins merged commit 4469ef1 into main Dec 9, 2025
9 checks passed
@richhiggins richhiggins deleted the fix/attempted-to-patch-a-read-only-document branch December 9, 2025 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants