Skip to content

Commit dd26c7c

Browse files
authoredAug 23, 2020
fix($core): decode regularPath when generate router config (fix #1946) (#1947)
1 parent 94a7de4 commit dd26c7c

File tree

1 file changed

+4
-2
lines changed
  • packages/@vuepress/core/lib/node/internal-plugins

1 file changed

+4
-2
lines changed
 

‎packages/@vuepress/core/lib/node/internal-plugins/routes.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,12 @@ function routesCode (pages) {
6565
}`
6666
}
6767

68-
if (regularPath !== pagePath) {
68+
const decodedRegularPath = decodeURIComponent(regularPath)
69+
70+
if (decodedRegularPath !== pagePath) {
6971
code += `,
7072
{
71-
path: ${JSON.stringify(regularPath)},
73+
path: ${JSON.stringify(decodedRegularPath)},
7274
redirect: ${JSON.stringify(pagePath)}
7375
}`
7476
}

0 commit comments

Comments
 (0)
Please sign in to comment.