diff --git a/blocks/editable/index.js b/blocks/editable/index.js index e7c68e2982ed2..9e20597691ff4 100644 --- a/blocks/editable/index.js +++ b/blocks/editable/index.js @@ -673,6 +673,10 @@ Editable.contextTypes = { Editable.Value = ( { value } ) => valueToReact( value ); function valueToReact( value ) { + if ( ! Array.isArray( value ) ) { + return value; + } + return value.map( ( element, i ) => { if ( typeof element === 'string' ) { return element; diff --git a/blocks/editable/test/index.js b/blocks/editable/test/index.js index 8afea0651166e..8ff8c8e5026ec 100644 --- a/blocks/editable/test/index.js +++ b/blocks/editable/test/index.js @@ -40,4 +40,52 @@ describe( 'Editable', () => { } ); /* eslint-enable no-console */ } ); + + describe( 'Editable.Value', () => { + const Component = ( { value } ) => ( +