Passing elements wrapped with the short syntax of React.Fragment
into a component as its children may cause a page to crash
#7391
Labels
bug
An error in the Docusaurus core causing instability or issues with its execution
domain: markdown
Related to Markdown parsing or syntax
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
For example, if I have a component like this:
Then I import this component in a doc and use the component like this:
I'll get this error:
Reproducible demo
https://github.com/awesomeraccoons/docusaurus/blob/main/docs/intro.md?plain=1
Steps to reproduce
children
prop and renders the elements in thechildren
.<></>
into an instance of it.Expected behavior
The page renders correctly as if the
<></>
was written in the form of<React.Fragment></React.Fragment>
.Actual behavior
The page crashes with the following error:
Your environment
Self-service
The text was updated successfully, but these errors were encountered: