Skip to content

Commit 3f13f1a

Browse files
committed
fix: location query
1 parent 473a8fe commit 3f13f1a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/helpers/query.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ export function getQuery () {
55
}
66

77
export function updateQuery (query) {
8-
const newUrl = window.location.origin + '/?' + qs.stringify(
8+
const { origin, pathname} = window.location
9+
const newUrl = origin + pathname + '/?' + qs.stringify(
910
{ ...getQuery(), ...query },
1011
{ encode: false }
1112
)

0 commit comments

Comments
 (0)