diff --git a/packages/rich-text/src/component/index.js b/packages/rich-text/src/component/index.js index 87e57e49e4333e..0e9291b7a5e03d 100644 --- a/packages/rich-text/src/component/index.js +++ b/packages/rich-text/src/component/index.js @@ -71,7 +71,9 @@ export function useRichText( { function setRecordFromProps() { _value.current = value; record.current = create( { - html: preserveWhiteSpace ? value : collapseWhiteSpace( value ), + html: preserveWhiteSpace + ? value + : collapseWhiteSpace( typeof value === 'string' ? value : '' ), } ); if ( disableFormats ) { record.current.formats = Array( value.length );