Skip to content
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Improve comments around attribute migration effect
  • Loading branch information
getdave committed Oct 14, 2022
commit 6f42e06914698d29452a52582f680ac23c1a5253
5 changes: 3 additions & 2 deletions packages/block-library/src/navigation/edit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,9 @@ function Navigation( {
const isEntityAvailable =
! isNavigationMenuMissing && isNavigationMenuResolved;

// Migrate numerical ID-based ref to
// string slug-based ref.
// Migrate the numerical ID-based ref attribute to the
// string-based slug attribute. This action soft-deprecates
// usage of the ref attribute in favour of the slug attribute.
useEffect( () => {
if ( isEntityAvailable && isNumeric( ref ) ) {
setRef( navigationMenu?.slug );
Expand Down