From c86c98d0003b317d82b691cd1fc1128a8679f5c0 Mon Sep 17 00:00:00 2001 From: Jai A Date: Thu, 26 Dec 2024 23:07:19 -0700 Subject: [PATCH] fix search flashing in prod --- apps/frontend/src/pages/search/[searchProjectType].vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/frontend/src/pages/search/[searchProjectType].vue b/apps/frontend/src/pages/search/[searchProjectType].vue index 39a12ed85..02f750f20 100644 --- a/apps/frontend/src/pages/search/[searchProjectType].vue +++ b/apps/frontend/src/pages/search/[searchProjectType].vue @@ -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(() => {