Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
acc[val] = convert(restProps[val]);
return acc;
},
{}
)
);
let keepImage = true;
return (
{Children.deepMap(children, (child) => {
if (isImage(child)) {
if (keepImage) {
keepImage = false;
return child;
} else {
return React.cloneElement(
child,
{ ...child.props, style: mapHiddenImageStyle(child.props.style) }
);
}
} else {
return child;
}
})}