Context assigned to null if component wrapped in Fragment
ivanblinov2k17 opened this issue · comments
ivanblinov2k17 commented
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);
}
Sampo Kivistö commented
Yeah, thanks for reporting this issue
Sampo Kivistö commented
This is fixed in 7.4.11