Skip to content

Commit 680832b

Browse files
committed
fix: correct pathname handling by ensuring language region is prefixed with a slash
1 parent 1632670 commit 680832b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class CoCreateFileSystem {
9292
if (langMatch) {
9393
langRegion = langMatch[1];
9494
lang = langRegion.split("-")[0]; // Get just the base language (e.g., 'en', 'es', 'fr')
95-
let basePathname = pathname.replace(langRegion, "");
95+
let basePathname = pathname.replace("/" + langRegion, "");
9696
data.$filter.query.pathname = basePathname;
9797
} else {
9898
data.$filter.query.pathname = pathname;

0 commit comments

Comments
 (0)