Skip to content

Commit 6e7d2a0

Browse files
committed
fix: used origin and pathname instead of href
1 parent bca6a07 commit 6e7d2a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/shared/utils/url.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { BUCKETS } from 'utils/challenge-listing/buckets';
1414
*/
1515
export function getCurrentUrl() {
1616
if (isomorphy.isServerSide()) return null;
17-
const url = window.location.href;
17+
const url = window.location.origin + window.location.pathname;
1818

1919
if (typeof url === 'string' && url.startsWith('http')) {
2020
return url;

0 commit comments

Comments
 (0)