From 35f0201210798ce99eb06d1b6d96b655a544d877 Mon Sep 17 00:00:00 2001 From: Carolina Nymark Date: Wed, 25 Sep 2024 05:28:41 +0200 Subject: [PATCH] Query loop format controls: Fix JavaScript error (#65551) Fixes a JavaScript error in FormatControls by ensuring that the correct constant is used when populating the suggestions in the FormTokenField. Co-authored-by: carolinan Co-authored-by: Mamaduka Co-authored-by: annezazu --- .../src/query/edit/inspector-controls/format-controls.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-library/src/query/edit/inspector-controls/format-controls.js b/packages/block-library/src/query/edit/inspector-controls/format-controls.js index d26fd9d81ce6f..15c95f3bbba2e 100644 --- a/packages/block-library/src/query/edit/inspector-controls/format-controls.js +++ b/packages/block-library/src/query/edit/inspector-controls/format-controls.js @@ -68,7 +68,7 @@ export default function FormatControls( { onChange, query: { format } } ) { .filter( Boolean ); const suggestions = formats - .filter( ( item ) => ! format.includes( item.value ) ) + .filter( ( item ) => ! normalizedFormats.includes( item.value ) ) .map( ( item ) => item.label ); return (