-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: correctly handle MDX layouts #6845
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 66db6dc The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
891fe2e
to
e53c329
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice but the return value is wrong I think, it needs to have the key on the top level component, no? And the static subtree flag should apply to all
return typeof MDXLayout === "undefined" ? | ||
_jsxC(RenderOnce, { children: content }, 3, key) : | ||
_jsxC(RenderOnce, { children: _jsxC(MDXLayout, { children: content }, 3, key)}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const children = typeof MDXLayout === "undefined" ? content : _jsxC(MDXLayout, { children: content }, 3)
return _jsxC(RenderOnce, children, 3, key);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not 100% sure tbh. I do know the previous revision worked and so does the one with your suggestion, so I'll take the latter due to my lack of understanding of the rendering nuances of _jsxC
. Thanks!
3218e43
to
3060cd2
Compare
3060cd2
to
66db6dc
Compare
What is it?
Description
This PR has fixes for two things:
package.json
were broken since the relative path was incorrect.Checklist:
pnpm change
and documented my changes