Skip to content

Commit

Permalink
Return empty attributes if serialization is skipped
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Feb 19, 2021
1 parent c4b904c commit 29d4578
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/block-supports/colors.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,7 @@ function gutenberg_apply_colors_support( $block_type, $block_attributes ) {
$color_support = gutenberg_experimental_get( $block_type->supports, array( 'color' ), false );

if ( array_key_exists( 'skipSerialization', $color_support ) && $color_support['skipSerialization'] ) {
return array(
'class' => '',
'styles' => '',
);
return array();
}

$has_text_colors_support = true === $color_support || ( is_array( $color_support ) && gutenberg_experimental_get( $color_support, array( 'text' ), true ) );
Expand Down

0 comments on commit 29d4578

Please sign in to comment.