We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 47fb24f + e1184b3 commit 2960712Copy full SHA for 2960712
src/middleware.ts
@@ -65,7 +65,13 @@ export const ensureCorrectLocalePrefixesInHtmlLinks = (
65
$("a").each(function () {
66
let href = $(this).attr("href");
67
// Skip if href is undefined, an external link, or written with a dot slash
68
- if (!href || href.startsWith("http") || href.startsWith("./")) return;
+ if (
69
+ !href ||
70
+ href.startsWith("http") ||
71
+ href.startsWith("./") ||
72
+ href.startsWith("#")
73
+ )
74
+ return;
75
76
const startsWithLocale = nonDefaultSupportedLocales.some(
77
(locale) => href && href.startsWith(`/${locale}/`),
0 commit comments