fix: `/:initialTab?` is shown on the URL when opening note with some ways (#16353)
This commit is contained in:
parent
aa10e537a5
commit
9273b21516
|
@ -165,6 +165,8 @@ function buildFullPath(args: {
|
||||||
const replaceRegex = new RegExp(`:${key}(\\?)?`, 'g');
|
const replaceRegex = new RegExp(`:${key}(\\?)?`, 'g');
|
||||||
fullPath = fullPath.replace(replaceRegex, value ? encodeURIComponent(value) : '');
|
fullPath = fullPath.replace(replaceRegex, value ? encodeURIComponent(value) : '');
|
||||||
}
|
}
|
||||||
|
// remove any optional parameters that are not provided
|
||||||
|
fullPath = fullPath.replace(/\/:\w+\?(?=\/|$)/g, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.query) {
|
if (args.query) {
|
||||||
|
|
Loading…
Reference in New Issue