Skip to content

Commit 0054bc0

Browse files
committed
Fix #18, Use location.pathname instead of originalPath when redirecting
Signed-off-by: Dmitriy Nevzorov <[email protected]>
1 parent 832e247 commit 0054bc0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plugin/wrapPageElement.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const wrapPageElement = (
5454

5555
if (detected !== defaultLanguage) {
5656
const queryParams = search || '';
57-
const newUrl = withPrefix(`/${detected}${originalPath}${queryParams}`);
57+
const newUrl = withPrefix(`/${detected}${location.pathname}${queryParams}`);
5858
window.location.replace(newUrl);
5959
return null;
6060
}

0 commit comments

Comments
 (0)