Skip to content

Commit

Permalink
fix(sanity): prevent empty patches being created
Browse files Browse the repository at this point in the history
  • Loading branch information
juice49 committed Sep 12, 2024
1 parent 94f5db3 commit d928123
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 d928123

Please sign in to comment.