Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let flags;
let children;
while (stack.length > 0) {
_vNode = stack.pop();
if (_vNode.dom === DOM) {
return true;
}
flags = _vNode.flags;
children = _vNode.children;
if (flags & VNodeFlags.ComponentClass) {
stack.push(children.$LI);
} else if (flags & VNodeFlags.ComponentFunction) {
stack.push(children);
} else {
flags = _vNode.childFlags;
if (flags & ChildFlags.MultipleChildren) {
let i = children.length;
while (i--) {
stack.push(children[i]);
}
} else if (flags & ChildFlags.HasVNodeChildren) {
stack.push(children);
}
}
}
function linkComponent({ location, match }): VNode {
const isActive = !!(getIsActive ? getIsActive(match, location) : match);
return createComponentVNode(
VNodeFlags.ComponentFunction,
Link,
combineFrom(
{
'aria-current': isActive && ariaCurrent,
className: isActive ? [className, activeClassName].filter(filter).join(' ') : className,
onClick,
style: isActive ? combineFrom(style, activeStyle) : style,
to
},
rest
)
);
}