We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 81e0597 commit 8bbe4b3Copy full SHA for 8bbe4b3
src/block-components/button/deprecated.js
@@ -32,6 +32,11 @@ export const deprecateButtonGradientColor = {
32
return getAttribute( 'backgroundColorType' ) === 'gradient' && getAttribute( 'backgroundColor2' )
33
},
34
migrate: attrNameTemplate => attributes => {
35
+ // Do not migrate if the attributes are not eligible.
36
+ if ( ! deprecateButtonGradientColor.isEligible( attrNameTemplate )( attributes ) ) {
37
+ return attributes
38
+ }
39
+
40
const getAttrName = getAttrNameFunction( attrNameTemplate )
41
const getAttribute = _attrName => attributes[ getAttrName( _attrName ) ]
42
0 commit comments