From 2f0b910e4991a133107cf559d7a197af5e1985ae Mon Sep 17 00:00:00 2001 From: Marin Atanasov Date: Wed, 12 Oct 2022 14:46:19 +0300 Subject: [PATCH] Tighten up activeSupports --- packages/block-editor/src/hooks/utils.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/block-editor/src/hooks/utils.js b/packages/block-editor/src/hooks/utils.js index b3e09e4598e5fd..24cb2fa851bc40 100644 --- a/packages/block-editor/src/hooks/utils.js +++ b/packages/block-editor/src/hooks/utils.js @@ -44,7 +44,11 @@ export function transformStyles( results ) { // If there are no active supports return early. - if ( Object.values( activeSupports ).every( ( 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