Skip to content

Commit

Permalink
fix search flashing in prod
Browse files Browse the repository at this point in the history
  • Loading branch information
Geometrically committed Dec 27, 2024
1 parent 4d9741c commit c86c98d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/frontend/src/pages/search/[searchProjectType].vue
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down

0 comments on commit c86c98d

Please sign in to comment.