Skip to content

Commit

Permalink
Site Logo: Correctly reset the site icon (#40046)
Browse files Browse the repository at this point in the history
* Replace assignment with nullish coalescing
* optimized code
* lint fix
  • Loading branch information
akasunil authored Apr 6, 2022
1 parent 716a1cc commit 113a809
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/block-library/src/site-logo/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,9 @@ export default function LogoEdit( {
};

const setIcon = ( newValue ) =>
// The new value needs to be `null` to reset the Site Icon.
editEntityRecord( 'root', 'site', undefined, {
site_icon: newValue,
site_icon: newValue ?? null,
} );

let alt = null;
Expand Down

0 comments on commit 113a809

Please sign in to comment.