From 77e23ec4fe07001498a764e90c33e263da1bbfe3 Mon Sep 17 00:00:00 2001 From: yogeshbhutkar Date: Fri, 10 Jan 2025 15:38:49 +0530 Subject: [PATCH] Refactor: simplify navigation title check logic --- packages/block-library/src/navigation/index.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/block-library/src/navigation/index.js b/packages/block-library/src/navigation/index.js index 7b0e6b8abef0fe..87f2f4bd15785d 100644 --- a/packages/block-library/src/navigation/index.js +++ b/packages/block-library/src/navigation/index.js @@ -66,11 +66,7 @@ export const settings = { ref ); - if ( ! navigation?.title ) { - return; - } - - if ( navigation.title === metadata.title ) { + if ( ! navigation?.title || navigation.title === metadata.title ) { return; }