Merged in fix/allow-double-locales (pull request #2977)
Fix/allow double locales * allow double locales for now * update redirects Approved-by: Linus Flood
This commit is contained in:
@@ -85,7 +85,11 @@ describe("createRedirectEntry", () => {
|
||||
})
|
||||
})
|
||||
|
||||
it("throws when non-dotcom has locale in path", () => {
|
||||
/*
|
||||
* This is currently a warning instead. Content will in the future clean this up.
|
||||
* And then we can re-enable this test to throw.
|
||||
*/
|
||||
it.skip("throws when non-dotcom has locale in path", () => {
|
||||
expect(() =>
|
||||
createRedirectEntry({
|
||||
oldUrl: "https://scandichotels.se/sv/old-path",
|
||||
|
||||
@@ -40,10 +40,7 @@ function validateUrl(url: string) {
|
||||
}
|
||||
|
||||
if (hasOldHostnameAndLocale(output)) {
|
||||
throw new Error(
|
||||
"Unsupported URL found, non-.com hostname with locale in path",
|
||||
{ cause: output.href }
|
||||
)
|
||||
console.warn(output.href, "- potentially unsupported format found")
|
||||
}
|
||||
|
||||
return output
|
||||
|
||||
Reference in New Issue
Block a user