Skip to content
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

Context assigned to null if component wrapped in Fragment #1579

Closed
ivanblinov2k17 opened this issue Oct 29, 2021 · 2 comments
Closed

Context assigned to null if component wrapped in Fragment #1579

ivanblinov2k17 opened this issue Oct 29, 2021 · 2 comments
Labels

Comments

@ivanblinov2k17
Copy link

ivanblinov2k17 commented Oct 29, 2021

Looks like a typo here

function mountFragment(vNode, context, parentDOM, isSVG, nextNode, lifecycle) {
    var children = vNode.children;
    var childFlags = vNode.childFlags;
    // When fragment is optimized for multiple children, check if there is no children and change flag to invalid
    // This is the only normalization always done, to keep optimization flags API same for fragments and regular elements
    if (childFlags & 12 /* MultipleChildren */ && children.length === 0) {
        childFlags = vNode.childFlags = 2 /* HasVNodeChildren */;
        children = vNode.children = createVoidVNode();
    }
    if (childFlags === 2 /* HasVNodeChildren */) {
        mount(children, parentDOM, nextNode, isSVG, nextNode, lifecycle);
    }
    else {
        mountArrayChildren(children, parentDOM, context, isSVG, nextNode, lifecycle);
    }
}

should be

if (childFlags === 2 /* HasVNodeChildren */) {
        mount(children, parentDOM, context, isSVG, nextNode, lifecycle);
}
@Havunen Havunen added the bug label Nov 3, 2021
@Havunen
Copy link
Member

Havunen commented Nov 3, 2021

Yeah, thanks for reporting this issue

Havunen pushed a commit that referenced this issue Nov 3, 2021
Havunen pushed a commit that referenced this issue Nov 3, 2021
@Havunen
Copy link
Member

Havunen commented Nov 3, 2021

This is fixed in 7.4.11

@Havunen Havunen closed this as completed Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants