Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/editor/src/store/private-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -614,9 +614,8 @@ export const restoreRevision =
}

// Build the edits object with all restorable fields from the revision.
// Setting blocks to undefined clears edited blocks, forcing a re-parse of content.
const edits = {
blocks: undefined,
blocks: parse( revision.content.raw ),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the real issue here is not here to be honest, setting blocks to undefined and content to a modified string is a valid "edit", it means the content has changed. Use the content, if you need blocks parse the content.

content: revision.content.raw,
};
if ( revision.title?.raw !== undefined ) {
Expand Down
Loading