fix(crawler): skip external link with no schema (#7806)

This commit is contained in:
Ahad Birang 2020-07-30 18:52:53 +04:30 committed by GitHub
parent 2e1025f2de
commit 19e68e770c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -304,7 +304,7 @@ export default class Generator {
const route = decodeURI(sanitizedHref + possibleTrailingSlash)
if (route.startsWith('/') && !path.extname(route) && this.shouldGenerateRoute(route) && !this.generatedRoutes.has(route)) {
if (route.startsWith('/') && !route.startsWith('//') && !path.extname(route) && this.shouldGenerateRoute(route) && !this.generatedRoutes.has(route)) {
this.generatedRoutes.add(route)
this.routes.push({ route })
}