Skip to content

Commit 6c6e76f

Browse files
authored
Merge pull request #22 from zcmgyu/master
Support in case URL contains an anchor hashtag
2 parents d04041f + 2948b36 commit 6c6e76f

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}${location.pathname}${queryParams}`);
57+
const newUrl = withPrefix(`/${detected}${location.pathname}${queryParams}${location.hash}`);
5858
window.location.replace(newUrl);
5959
return null;
6060
}

0 commit comments

Comments
 (0)