Skip to content

Commit 99f1bb6

Browse files
authored
fix(sanity): prevent empty patches being created (#7499)
1 parent caec753 commit 99f1bb6

File tree

1 file changed

+5
-1
lines changed
  • packages/sanity/src/core/store/_legacy/document/document-pair/serverOperations

1 file changed

+5
-1
lines changed

packages/sanity/src/core/store/_legacy/document/document-pair/serverOperations/patch.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ export const patch: OperationImpl<[patches: any[], initialDocument?: Record<stri
4444
return
4545
}
4646
const ensureDraft = snapshots.draft
47-
? []
47+
? draft.patch([
48+
{
49+
unset: ['_empty_action_guard_pseudo_field_'],
50+
},
51+
])
4852
: [
4953
draft.create({
5054
...initialDocument,

0 commit comments

Comments
 (0)