Skip to content

Commit

Permalink
fix: short circuit weird soft navigation error for project approvals (c…
Browse files Browse the repository at this point in the history
…loses #1374)
  • Loading branch information
MiniDigger committed Jul 7, 2024
1 parent 89e3310 commit 4f2f8e8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions frontend/src/pages/[user]/[project].vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ defineProps<{
}>();
const route = useRoute("user-project");
const project = await useProject(route.params.project);
await verify(route);
// for some reason this page is triggered twice on soft navigation, need to short circuit the case where the params are empty
const project = route.params.project ? await useProject(route.params.project) : ref(null);
if ("project" in route.params) {
await verify(route);
}
async function verify(to: RouteLocationNormalizedTyped<any>) {
if (!project?.value) {
Expand Down

0 comments on commit 4f2f8e8

Please sign in to comment.