Skip to content

Commit 3870c99

Browse files
committed
Fix Bard Undo after adding Sets
prevent no-op ProseMirror transactions from being added to history which are essentially no-change undo states that make it appear like the undo didn't work.
1 parent 8c478d0 commit 3870c99

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • resources/js/components/fieldtypes/bard

resources/js/components/fieldtypes/bard/Set.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@ export default {
349349
() => data_get(this.publishContainer.values.value, this.fieldPathPrefix),
350350
(values) => {
351351
if (! values) return;
352+
if (JSON.stringify(values) === JSON.stringify(this.node.attrs.values)) return;
352353
353354
this.updateAttributes({ values });
354355
},

0 commit comments

Comments
 (0)