From f896aa3f95ef3d7fbb1a3c2015b4b444b340f62a Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Fri, 1 Apr 2022 16:03:27 +0100 Subject: [PATCH] Avoid var declaration Addresses https://github.com/WordPress/gutenberg/pull/39880#discussion_r840401238 --- packages/block-library/src/navigation/edit/index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/block-library/src/navigation/edit/index.js b/packages/block-library/src/navigation/edit/index.js index 2de17eaeec034..8abe2f278a50f 100644 --- a/packages/block-library/src/navigation/edit/index.js +++ b/packages/block-library/src/navigation/edit/index.js @@ -297,9 +297,7 @@ function Navigation( { return; } - const firstAndOnlyNavigationMenu = navigationMenus[ 0 ]; - - setRef( firstAndOnlyNavigationMenu.id ); + setRef( navigationMenus[ 0 ].id ); }, [ navigationMenus ] ); const navRef = useRef();