Skip to content

Commit

Permalink
fix isEligible
Browse files Browse the repository at this point in the history
  • Loading branch information
mxkae committed Jun 19, 2024
1 parent 3c8b773 commit ac48019
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/block/icon-label/deprecated.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ const deprecated = [
{
attributes: attributes( '3.13.1' ),
save: withVersion( '3.13.1' )( Save ),
isEligible: attributes => {
isEligible: ( attributes, innerBlocks ) => {
const hasIconSize = innerBlocks[ 0 ].attributes.iconSize ? true : false
const hasIconGap = attributes.iconGap ? true : false
return hasIconGap
const hasIconGap2 = attributes.iconGap2 ? true : false
return hasIconGap || ( hasIconSize && ! hasIconGap2 )
},
migrate: ( attributes, innerBlocks ) => {
const newAttributes = { ...attributes }
Expand Down

0 comments on commit ac48019

Please sign in to comment.