Skip to content

Commit

Permalink
RichText: back compat for multiline root tag (#24324)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix authored Aug 3, 2020
1 parent c1b0553 commit d348f55
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/rich-text/src/component/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,12 @@ function RichText( {
} ) {
const [ activeFormats = [], setActiveFormats ] = useState();

// For backward compatibility, fall back to tagName if it's a string.
// tagName can now be a component for light blocks.
if ( ! multilineRootTag && typeof TagName === 'string' ) {
multilineRootTag = TagName;
}

function getDoc() {
return ref.current.ownerDocument;
}
Expand Down

0 comments on commit d348f55

Please sign in to comment.