fix: problem cast param id
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Javier Segarra 2024-09-03 22:00:57 +02:00
parent 4d4997951c
commit 0f9d727015
1 changed files with 4 additions and 0 deletions

View File

@ -71,6 +71,10 @@ export default route(function (/* { store, ssrContext } */) {
} }
} }
if (to.params.id && !/^\d+$/.test(to.params.id)) {
return next(to.matched[1]?.children[0]?.redirect);
}
next(); next();
}); });