Skip to content

Commit

Permalink
fix(sanity): prevent empty patches being created (#7499)
Browse files Browse the repository at this point in the history
  • Loading branch information
juice49 authored Sep 13, 2024
1 parent caec753 commit 99f1bb6
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ export const patch: OperationImpl<[patches: any[], initialDocument?: Record<stri
return
}
const ensureDraft = snapshots.draft
? []
? draft.patch([
{
unset: ['_empty_action_guard_pseudo_field_'],
},
])
: [
draft.create({
...initialDocument,
Expand Down

0 comments on commit 99f1bb6

Please sign in to comment.