This fixes it and i don't know why because it still redirects O_O (#5051)

This commit is contained in:
Prospector
2026-01-05 14:16:00 -08:00
committed by GitHub
parent c2bd88377b
commit 5b890dcd8a
2 changed files with 10 additions and 2 deletions

View File

@@ -41,6 +41,7 @@ export const DEFAULT_FEATURE_FLAGS = validateValues({
newProjectEnvironmentSettings: true, newProjectEnvironmentSettings: true,
hideRussiaCensorshipBanner: false, hideRussiaCensorshipBanner: false,
serverDiscovery: false, serverDiscovery: false,
disablePrettyProjectUrlRedirects: false,
// advancedRendering: true, // advancedRendering: true,
// externalLinksNewTab: true, // externalLinksNewTab: true,
// notUsingBlockers: false, // notUsingBlockers: false,

View File

@@ -1558,7 +1558,11 @@ try {
} }
async function updateProjectRoute() { async function updateProjectRoute() {
if (project.value && route.params.id !== project.value.slug) { if (
project.value &&
route.params.id !== project.value.slug &&
!flags.value.disablePrettyProjectUrlRedirects
) {
await navigateTo( await navigateTo(
{ {
name: route.name, name: route.name,
@@ -1617,7 +1621,10 @@ if (!project.value) {
}) })
} }
if (project.value.project_type !== route.params.type || route.params.id !== project.value.slug) { if (
project.value.project_type !== route.params.type ||
(route.params.id !== project.value.slug && !flags.value.disablePrettyProjectUrlRedirects)
) {
let path = route.fullPath.split('/') let path = route.fullPath.split('/')
path.splice(0, 3) path.splice(0, 3)
path = path.filter((x) => x) path = path.filter((x) => x)