Skip to content

Commit

Permalink
fix: middleware demande sejours
Browse files Browse the repository at this point in the history
  • Loading branch information
iNeoO committed Nov 22, 2024
1 parent 7ac1b43 commit b3a6d85
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import { navigateTo, defineNuxtRouteMiddleware } from "#app";
export default defineNuxtRouteMiddleware(async (to) => {
const hasId = !!to.params.declarationId;
const demandeStore = useDemandeSejourStore();

if (!!hasId || isNaN(to.params.declarationId)) {
if (hasId && isNaN(to.params.declarationId)) {
return navigateTo("/");
}

Expand Down

0 comments on commit b3a6d85

Please sign in to comment.