Skip to content

Commit

Permalink
refactors un-needed function wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
draganescu committed Jul 9, 2020
1 parent f474b7f commit 6207832
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/block-library/src/navigation-link/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 6207832

Please sign in to comment.