Skip to content

Commit

Permalink
fix: Add title attribute to post save action
Browse files Browse the repository at this point in the history
  • Loading branch information
dhananjaykuber committed Jan 7, 2025
1 parent dd70c03 commit b5e6341
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/editor/src/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ export const savePost =
}

const content = select.getEditedPostContent();
const title = select.getEditedPostAttribute( 'title' );

if ( ! options.isAutosave ) {
dispatch.editPost( { content }, { undoIgnore: true } );
Expand All @@ -212,6 +213,7 @@ export const savePost =
const previousRecord = select.getCurrentPost();
let edits = {
id: previousRecord.id,
title,
...registry
.select( coreStore )
.getEntityRecordNonTransientEdits(
Expand Down

0 comments on commit b5e6341

Please sign in to comment.