diff --git a/packages/editor/src/components/post-taxonomies/flat-term-selector.js b/packages/editor/src/components/post-taxonomies/flat-term-selector.js index 21a62c9819026..cd9377766af50 100644 --- a/packages/editor/src/components/post-taxonomies/flat-term-selector.js +++ b/packages/editor/src/components/post-taxonomies/flat-term-selector.js @@ -57,6 +57,13 @@ const termNamesToIds = ( names, terms ) => { .filter( ( id ) => id !== undefined ); }; +const Wrapper = ( { children, __nextHasNoMarginBottom } ) => + __nextHasNoMarginBottom ? ( + { children } + ) : ( + { children } + ); + /** * Renders a flat term selector component. * @@ -292,15 +299,8 @@ export function FlatTermSelector( { slug, __nextHasNoMarginBottom } ) { singularName ); - const Wrapper = ( { children } ) => - __nextHasNoMarginBottom ? ( - { children } - ) : ( - { children } - ); - return ( - +