From 0f9d727015272383e6a150723e520055ec6216ab Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 3 Sep 2024 22:00:57 +0200 Subject: [PATCH] fix: problem cast param id --- src/router/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/router/index.js b/src/router/index.js index 686da2dde..dfe066345 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -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(); });