1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-06-01 10:54:22 +02:00

fix: /:initialTab? is shown on the URL when opening note with some ways (#16353)

This commit is contained in:
anatawa12
2025-08-03 22:12:35 +09:00
committed by GitHub
parent aa10e537a5
commit 9273b21516

View File

@@ -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) {