Skip to content

Commit

Permalink
Query loop format controls: Fix JavaScript error (#65551)
Browse files Browse the repository at this point in the history
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 <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: annezazu <[email protected]>
  • Loading branch information
4 people committed Sep 25, 2024
1 parent 1dc56a9 commit b5129a2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit b5129a2

Please sign in to comment.