From e05e1be77ec4806adba7da67dad232e945ad3033 Mon Sep 17 00:00:00 2001 From: Andrei Draganescu Date: Tue, 1 Oct 2019 13:10:24 +0300 Subject: [PATCH] default inserter label is used in so many tests --- packages/block-editor/src/components/inserter/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/block-editor/src/components/inserter/index.js b/packages/block-editor/src/components/inserter/index.js index 87eabe4dc155d..0b04697e7cfed 100644 --- a/packages/block-editor/src/components/inserter/index.js +++ b/packages/block-editor/src/components/inserter/index.js @@ -23,7 +23,10 @@ import { import InserterMenu from './menu'; const defaultRenderToggle = ( { onToggle, disabled, isOpen, blockTitle } ) => { - const label = sprintf( _x( 'Add %s', 'directly add the allowed block' ), blockTitle ); + let label = sprintf( _x( 'Add %s', 'directly add the allowed block' ), blockTitle ); + if ( blockTitle === '' ) { + label = 'Add block'; + } return (