Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
props = vNode.props = {};
}
// React supports iterable children, in addition to Array-like
if (hasSymbolSupport && !isNull(children) && typeof children === 'object' && !isArray(children) && isFunction(children[symbolIterator])) {
vNode.children = iterableToArray(children[symbolIterator]());
}
if (!isNullOrUndef(children) && isNullOrUndef(props.children)) {
props.children = children;
}
if (vNode.flags & VNodeFlags.Component) {
if (isString(vNode.type)) {
vNode.flags = getFlagsForElementVnode(vNode.type as string);
if (props) {
normalizeProps(vNode);
}
}
}
const flags = vNode.flags;
if (flags & VNodeFlags.FormElement) {
normalizeFormProps(vNode.type, props);
}
if (flags & VNodeFlags.Element) {
if (vNode.className) {
props.className = vNode.className;
}
normalizeGenericProps(props);
}
public render() {
const selector = this.selector;
selector.shouldComponentUpdate = false;
if (selector.error) {
throw selector.error;
} else {
return normalizeProps(
createComponentVNode(
VNodeFlags.ComponentUnknown,
WrappedComponent,
this.addExtraProps(selector.props),
null,
withRef ? this.setWrappedInstance : null
)
);
}
}
}
props.children = children;
if (flags & VNodeFlags.Component) {
return createComponentVNode(flags, vNodeToClone.type, !vNodeToClone.props && !props ? EMPTY_OBJ : combineFrom(vNodeToClone.props, props), key, ref);
}
if (flags & VNodeFlags.Text) {
return createTextVNode(children);
}
if (flags & VNodeFlags.Fragment) {
return createFragment(childLen === 1 ? [children] : children, ChildFlags.UnknownChildren, key);
}
return normalizeProps(
createVNode(flags, vNodeToClone.type, className, null, ChildFlags.HasInvalidChildren, combineFrom(vNodeToClone.props, props), key, ref)
);
}