Skip to content

Commit

Permalink
Update SiteTitle block to Fix isLink Toggle Behavior (WordPress#68295)
Browse files Browse the repository at this point in the history
* Update link reset logic in SiteTitle

* Fix condition for link value in SiteTitleEdit component

Co-authored-by: Sukhendu2002 <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: fabiankaegy <[email protected]>
  • Loading branch information
4 people authored Dec 26, 2024
1 parent b7356af commit 4ad26e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/block-library/src/site-title/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,16 @@ export default function SiteTitleEdit( {
label={ __( 'Settings' ) }
resetAll={ () => {
setAttributes( {
isLink: false,
isLink: true,
linkTarget: '_self',
} );
} }
dropdownMenuProps={ dropdownMenuProps }
>
<ToolsPanelItem
hasValue={ () => isLink !== false }
hasValue={ () => ! isLink }
label={ __( 'Make title link to home' ) }
onDeselect={ () => setAttributes( { isLink: false } ) }
onDeselect={ () => setAttributes( { isLink: true } ) }
isShownByDefault
>
<ToggleControl
Expand Down

0 comments on commit 4ad26e1

Please sign in to comment.