From 62078321aff02386bffafd24dadec86c6103d235 Mon Sep 17 00:00:00 2001 From: Andrei Draganescu Date: Thu, 9 Jul 2020 20:12:01 +0300 Subject: [PATCH] refactors un-needed function wrapper --- packages/block-library/src/navigation-link/edit.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/block-library/src/navigation-link/edit.js b/packages/block-library/src/navigation-link/edit.js index ce1f0926a9bd55..21754491fab5bb 100644 --- a/packages/block-library/src/navigation-link/edit.js +++ b/packages/block-library/src/navigation-link/edit.js @@ -263,11 +263,7 @@ function NavigationLinkEdit( { id: newId, } = {} ) => setAttributes( { - url: newId - ? undefined - : ( () => { - return encodeURI( newURL ); - } )(), + url: newId ? undefined : newURL, label: ( () => { const normalizedTitle = newTitle.replace( /http(s?):\/\//gi,