-
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: find correct context after rendering empty array #7234
Conversation
🦋 Changeset detectedLatest commit: b23eef2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 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 |
0d003fe
to
0922571
Compare
0922571
to
b23eef2
Compare
commit: |
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
@@ -141,7 +141,7 @@ export class SsrComponentFrame implements ISsrComponentFrame { | |||
if (isJSXNode(children)) { | |||
const slotName = this.getSlotName(children); | |||
mapArray_set(this.slots, slotName, children, 0); | |||
} else if (Array.isArray(children)) { |
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 a bit confused. The test mentions we should add slot information for an empty array, but in ssr node we're adding an additional guard to only execute when it's not empty.
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.
yeah, the code which is responsible to add this is below in the else block :D
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!
Fix a problem with slot prop for ssr. Empty arrays should be considered as empty content.