fix(frontend): mod search page with trailing slash (#2914)
Replaces the substring operation to find project type with a regex. The regex is a bit complex, so I added a comment explaining it. Resolves #1382
This commit is contained in:
parent
3ef56ce66e
commit
ac46026f99
@ -473,7 +473,7 @@ async function serverInstall(project) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
projectType.value = tags.value.projectTypes.find(
|
projectType.value = tags.value.projectTypes.find(
|
||||||
(x) => x.id === route.path.substring(1, route.path.length - 1),
|
(x) => x.id === route.path.replaceAll(/^\/|s\/?$/g, ""), // Removes prefix `/` and suffixes `s` and `s/`
|
||||||
);
|
);
|
||||||
|
|
||||||
const noLoad = ref(false);
|
const noLoad = ref(false);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user