Skip to content

Commit e72b8e7

Browse files
committed
fix: only run the migration if text shadow uses rgba
1 parent d2afac6 commit e72b8e7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/block-components/typography/deprecated.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ export const deprecateTypographyShadowColor = {
7777
const getAttrName = getAttrNameFunction( attrNameTemplate )
7878
const getAttribute = _attrName => attributes[ getAttrName( _attrName ) ]
7979

80-
if ( getAttribute( 'textShadow' ) || getAttribute( 'textShadowHover' ) || getAttribute( 'textShadowParentHover' ) ) {
80+
if ( ( getAttribute( 'textShadow' ) && getAttribute( 'textShadow' ).indexOf( 'rgba' ) !== -1 ) ||
81+
( getAttribute( 'textShadowHover' ) && getAttribute( 'textShadowHover' ).indexOf( 'rgba' ) !== -1 ) ||
82+
( getAttribute( 'textShadowParentHover' ) && getAttribute( 'textShadowParentHover' ).indexOf( 'rgba' ) ) ) {
8183
return true
8284
}
8385

0 commit comments

Comments
 (0)