fix: refs #6891 correct redirection

This commit is contained in:
Jorge Penadés 2024-05-08 13:22:21 +02:00
parent 54de101442
commit c02dcf622a
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ export default function useRedirect() {
const to =
data.length === 1
? path.replace(/\/(list|-list|:id)/, `/${data[0].id}`)
? path.replace(/\/(list|:id)|-list/, `/${data[0].id}`)
: path.replace(/:id.*/, '');
router.push({ path: to });