Skip to content

Commit

Permalink
Refactor: use getEditedEntityRecord instead of getEntityRecord
Browse files Browse the repository at this point in the history
  • Loading branch information
yogeshbhutkar committed Jan 9, 2025
1 parent 453a690 commit 1273df0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/block-library/src/navigation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,18 @@ export const settings = {
return __( 'Navigation' );
}

const navigation = select( coreStore ).getEntityRecord(
const navigation = select( coreStore ).getEditedEntityRecord(
'postType',
'wp_navigation',
ref
);

return navigation?.title?.rendered
return navigation?.title
? sprintf(
/* translators: %1$s: block title, %2$s: navigation menu title */
__( '%1$s (%2$s)' ),
metadata.title,
decodeEntities( navigation.title.rendered )
decodeEntities( navigation.title )
)
: __( 'Navigation' );
},
Expand Down

0 comments on commit 1273df0

Please sign in to comment.