fix search flashing in prod

This commit is contained in:
Jai A 2024-12-26 23:07:19 -07:00
parent 4d9741c424
commit c86c98d000
No known key found for this signature in database
GPG Key ID: 9A9F9B7250E9883C

View File

@ -344,9 +344,13 @@ const auth = await useAuth();
const projectType = ref();
function setProjectType() {
projectType.value = tags.value.projectTypes.find(
const projType = tags.value.projectTypes.find(
(x) => x.id === route.path.replaceAll(/^\/|s\/?$/g, ""), // Removes prefix `/` and suffixes `s` and `s/`
);
if (projType) {
projectType.value = projType;
}
}
setProjectType();
router.afterEach(() => {