diff --git a/packages/block-editor/src/components/colors-gradients/control.js b/packages/block-editor/src/components/colors-gradients/control.js
index 34e4f334e3c588..685adea3a664d6 100644
--- a/packages/block-editor/src/components/colors-gradients/control.js
+++ b/packages/block-editor/src/components/colors-gradients/control.js
@@ -2,7 +2,7 @@
* External dependencies
*/
import classnames from 'classnames';
-import { every, isEmpty } from 'lodash';
+import { isEmpty } from 'lodash';
/**
* WordPress dependencies
@@ -180,7 +180,7 @@ function ColorGradientControlSelect( props ) {
function ColorGradientControl( props ) {
if (
- every( colorsAndGradientKeys, ( key ) => props.hasOwnProperty( key ) )
+ colorsAndGradientKeys.every( ( key ) => props.hasOwnProperty( key ) )
) {
return ;
}
diff --git a/packages/block-editor/src/components/colors-gradients/panel-color-gradient-settings.js b/packages/block-editor/src/components/colors-gradients/panel-color-gradient-settings.js
index 797a6c9463697d..a69a53e549902a 100644
--- a/packages/block-editor/src/components/colors-gradients/panel-color-gradient-settings.js
+++ b/packages/block-editor/src/components/colors-gradients/panel-color-gradient-settings.js
@@ -2,7 +2,7 @@
* External dependencies
*/
import classnames from 'classnames';
-import { every, isEmpty } from 'lodash';
+import { isEmpty } from 'lodash';
/**
* WordPress dependencies
@@ -50,8 +50,7 @@ export const PanelColorGradientSettingsInner = ( {
isEmpty( gradients ) &&
disableCustomColors &&
disableCustomGradients &&
- every(
- settings,
+ settings?.every(
( setting ) =>
isEmpty( setting.colors ) &&
isEmpty( setting.gradients ) &&
@@ -137,7 +136,7 @@ const PanelColorGradientSettingsMultipleSelect = ( props ) => {
const PanelColorGradientSettings = ( props ) => {
if (
- every( colorsAndGradientKeys, ( key ) => props.hasOwnProperty( key ) )
+ colorsAndGradientKeys.every( ( key ) => props.hasOwnProperty( key ) )
) {
return ;
}
diff --git a/packages/block-editor/src/hooks/utils.js b/packages/block-editor/src/hooks/utils.js
index 8d638e997d828a..24cb2fa851bc40 100644
--- a/packages/block-editor/src/hooks/utils.js
+++ b/packages/block-editor/src/hooks/utils.js
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
-import { pickBy, isEmpty, mapValues, get, setWith, clone, every } from 'lodash';
+import { pickBy, isEmpty, mapValues, get, setWith, clone } from 'lodash';
/**
* WordPress dependencies
@@ -44,7 +44,11 @@ export function transformStyles(
results
) {
// If there are no active supports return early.
- if ( every( activeSupports, ( isActive ) => ! isActive ) ) {
+ if (
+ Object.values( activeSupports ?? {} ).every(
+ ( isActive ) => ! isActive
+ )
+ ) {
return result;
}
// If the condition verifies we are probably in the presence of a wrapping transform