updated replaceQueryParams to use the last ?

This commit is contained in:
Gani Georgiev
2023-10-14 15:11:32 +03:00
parent 01e33c07fe
commit 1f6ab24b34
31 changed files with 42 additions and 40 deletions
+4 -2
View File
@@ -1971,7 +1971,8 @@ export default class CommonHelper {
let url = window.location.href
const queryStart = url.indexOf("?");
// pick the last index to ensure that the correct ? is used even for hash-based routes
const queryStart = url.lastIndexOf("?");
if (queryStart > -1) {
query = url.substring(queryStart + 1);
url = url.substring(0, queryStart);
@@ -1993,7 +1994,8 @@ export default class CommonHelper {
let url = window.location.href
const queryStart = url.indexOf("?");
// pick the last index to ensure that the correct ? is used even for hash-based routes
const queryStart = url.lastIndexOf("?");
if (queryStart > -1) {
query = url.substring(queryStart + 1);
url = url.substring(0, queryStart);