-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed
Description
🐛 Bug Report
The following markdown will throw an error in the docs because the <code> component seems to expect a string for children.
<pre><code>
new Channel(<em>executor</em>)
</code></pre>Throws this error:
TypeError: children.trim is not a function. (In 'children.trim()', 'children.trim' is undefined)
(anonymous function) — index.js:21
renderWithHooks — react-dom.development.js:12938
mountIndeterminateComponent — react-dom.development.js:15020
performUnitOfWork — react-dom.development.js:19312
workLoop — react-dom.development.js:19352
callCallback — react-dom.development.js:149
dispatchEvent
invokeGuardedCallbackDev — react-dom.development.js:199
invokeGuardedCallback — react-dom.development.js:256
replayUnitOfWork — react-dom.development.js:18578
renderRoot — react-dom.development.js:19468
performWorkOnRoot — react-dom.development.js:20342
performWork — react-dom.development.js:20254
performSyncWork — react-dom.development.js:20228
requestWork — react-dom.development.js:20097
scheduleWork — react-dom.development.js:19911
scheduleRootUpdate — react-dom.development.js:20572
render — react-dom.development.js:20953
(anonymous function) — react-dom.development.js:21090
legacyRenderSubtreeIntoContainer — react-dom.development.js:21086
(anonymous function) — clientEntry.js:25
promiseReactionJob
logCapturedError — react-dom.development.js:17117
Have you read the Contributing Guidelines on issues?
Yes
To Reproduce
(Write your steps here:)
- Create a new docusaurus 2.x site
- Paste the above markdown snippet into a file
- Visit the doc page.
Expected behavior
The code component should handle react elements for children gracefully.
Actual Behavior
It does not.
Reproducible Demo
Skipping this step 😘
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels