Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (order) {
const redirect = getRedirect(
redirects,
location.pathname.replace(/order(2|s)\/[^\/]+/, ""),
{ order }
)
if (redirect !== null) {
if (process.env.NODE_ENV === "development") {
console.error(
`Redirecting from ${location.pathname} to ${
redirect.path
} because '${redirect.reason}'`
)
}
throw new RedirectException(redirect.path)
}
}
return
}
},
children: [
function handleRedirect(redirect: Redirect, location: Location) {
if (redirect) {
logger.warn(
`Redirecting from ${location.pathname} to ${redirect.path} because '${
redirect.reason
}'`
)
throw new RedirectException(redirect.path)
}
}
function handleRedirect(redirect, location) {
if (redirect) {
logger.warn("Redirecting from ".concat(location.pathname, " to ").concat(redirect.path, " because '").concat(redirect.reason, "'"));
throw new _found.RedirectException(redirect.path);
}
}
//# sourceMappingURL=routes.js.map