Skip to content

Commit

Permalink
useEditorTitle: fix wrong request without ID
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Dec 2, 2024
1 parent c517e41 commit f8ccd8d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/edit-site/src/components/editor/use-editor-title.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ function useEditorTitle( postType, postId ) {
const { getEditedEntityRecord, hasFinishedResolution } =
select( coreStore );

if ( ! postId ) {
return { isLoaded: false };
}

const _record = getEditedEntityRecord(
'postType',
postType,
Expand Down

0 comments on commit f8ccd8d

Please sign in to comment.