fix(shared): Sidestep MDX 2.2 dev runtime issue. Closes #3301
This commit is contained in:
parent
b8984a3bef
commit
f19ba58565
2 changed files with 4 additions and 2 deletions
|
@ -22,7 +22,8 @@ const MdxWrapper = ({ mdx, app, t, components = {} }) => {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
;(async () => {
|
;(async () => {
|
||||||
setMdxModule(await run(mdx, runtime))
|
// Workaround for issue introduced in MDX 2.2
|
||||||
|
setMdxModule(await run(mdx, { ...runtime, jsxDEV: runtime.jsx }))
|
||||||
})()
|
})()
|
||||||
}, [mdx])
|
}, [mdx])
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,8 @@ const TocWrapper = ({ toc, app }) => {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
;(async () => {
|
;(async () => {
|
||||||
setMdxModule(await run(toc, runtime))
|
// Workaround for issue introduced in MDX 2.2
|
||||||
|
setMdxModule(await run(toc, { ...runtime, jsxDEV: runtime.jsx }))
|
||||||
})()
|
})()
|
||||||
}, [toc])
|
}, [toc])
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue