mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-25 06:20:25 +01:00
updated replaceQueryParams to use the last ?
This commit is contained in:
1 parent
01e33c07fe
commit
1f6ab24b34
31 files changed
+42
-40
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user