We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
some
filter
1 parent 3e1f5d8 commit 1aceca1Copy full SHA for 1aceca1
packages/@vuepress/core/lib/client/redirect.js
@@ -50,5 +50,6 @@ export function handleRedirectForCleanUrls (router) {
50
}
51
52
function isRouteExists (router, path) {
53
- return router.options.routes.filter(route => route.path.toLowerCase() === path.toLowerCase()).length > 0
+ const pathLower = path.toLowerCase()
54
+ return router.options.routes.some(route => route.path.toLowerCase() === pathLower)
55
0 commit comments