fix: refs #6891 correct redirection
This commit is contained in:
parent
54de101442
commit
c02dcf622a
|
@ -15,7 +15,7 @@ export default function useRedirect() {
|
||||||
|
|
||||||
const to =
|
const to =
|
||||||
data.length === 1
|
data.length === 1
|
||||||
? path.replace(/\/(list|-list|:id)/, `/${data[0].id}`)
|
? path.replace(/\/(list|:id)|-list/, `/${data[0].id}`)
|
||||||
: path.replace(/:id.*/, '');
|
: path.replace(/:id.*/, '');
|
||||||
|
|
||||||
router.push({ path: to });
|
router.push({ path: to });
|
||||||
|
|
Loading…
Reference in New Issue