Skip to content

Commit

Permalink
Include attributes with default values in check
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka committed Oct 28, 2021
1 parent b37f9f5 commit a895df9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/block-library/src/search/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default function SearchEdit( {
return;
}

if ( isNavigationChild ) {
if ( isNavigationChild && showLabel && ! buttonUseIcon ) {
// This side-effect should not create an undo level.
__unstableMarkNextChangeAsNotPersistent();
setAttributes( {
Expand All @@ -104,7 +104,7 @@ export default function SearchEdit( {

hasChangedDefaults.current = true;
}
}, [ isNavigationChild ] );
}, [ isNavigationChild, showLabel, buttonUseIcon ] );

// Check for old deprecated numerical border radius. Done as a separate
// check so that a borderRadius style won't overwrite the longhand
Expand Down

0 comments on commit a895df9

Please sign in to comment.