diff --git a/lib/global-styles.php b/lib/global-styles.php index 7fb4d7ced95af9..10f10acb4d5a08 100644 --- a/lib/global-styles.php +++ b/lib/global-styles.php @@ -196,12 +196,7 @@ function_exists( 'gutenberg_is_edit_site_page' ) && unset( $settings['__experimentalFeatures']['typography']['customLineHeight'] ); } if ( isset( $settings['__experimentalFeatures']['spacing']['units'] ) ) { - if ( ! is_array( $settings['__experimentalFeatures']['spacing']['units'] ) ) { - $settings['enableCustomUnits'] = false; - } else { - $settings['enableCustomUnits'] = count( $settings['__experimentalFeatures']['spacing']['units'] ) > 0; - } - unset( $settings['__experimentalFeatures']['spacing']['units'] ); + $settings['enableCustomUnits'] = $settings['__experimentalFeatures']['spacing']['units']; } if ( isset( $settings['__experimentalFeatures']['spacing']['customPadding'] ) ) { $settings['enableCustomSpacing'] = $settings['__experimentalFeatures']['spacing']['customPadding'];