Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
useCreateElement(type, { href, ...props }, children) {
if (href && /^\/(?!\/)/.test(href)) {
return useCreateElement(Link, { to: href, ...props }, children);
}
return useCreateElement(type, { href, ...props }, children);
}
});
useCreateElement(type, { href, ...props }, children) {
if (href && /^\/(?!\/)/.test(href)) {
return useCreateElement(Link, { to: href, ...props }, children);
}
return useCreateElement(type, { href, ...props }, children);
}
});