Skip to content

Commit

Permalink
Merge pull request #282 from yileifeng/fix-router-redirect
Browse files Browse the repository at this point in the history
Fix Vue 3 router redirect
  • Loading branch information
yileifeng authored Apr 18, 2024
2 parents f6ce309 + 21b5d17 commit 62e26ca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ const routes = [
},
{
path: '/:lang/editor/:uid',
redirect: '/:lang/editor-metadata/:uid'
redirect: (to: RouteLocationNormalized) => {
return '/' + to.params.lang + '/editor-metadata/' + to.params.uid;
}
},
{
path: '/:lang/editor-metadata',
Expand Down

0 comments on commit 62e26ca

Please sign in to comment.