Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const ref = vNode.ref;
isSVG = isSVG || (flags & VNodeFlags.SvgElement) > 0;
if (dom.nodeType !== 1 || dom.tagName.toLowerCase() !== vNode.type) {
if (process.env.NODE_ENV !== 'production') {
warning("Inferno hydration: Server-side markup doesn't match client-side markup");
}
_ME(vNode, null, context, isSVG, null, lifecycle);
parentDOM.replaceChild(vNode.dom as Element, dom);
} else {
vNode.dom = dom;
hydrateChildren(vNode, dom, dom.firstChild, context, isSVG, lifecycle);
if (!isNull(props)) {
_MP(vNode, flags, props, dom, isSVG);
}
if (isNullOrUndef(className)) {
if (dom.className !== '') {
dom.removeAttribute('class');
}
} else if (isSVG) {
dom.setAttribute('class', className);
} else {
dom.className = className;
}
_MR(ref, dom, lifecycle);
}
return vNode.dom;
}