Explorar o código

fixed depth test

Gildas %!s(int64=5) %!d(string=hai) anos
pai
achega
dfd47fd95f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      cli/single-file-cli-api.js

+ 1 - 1
cli/single-file-cli-api.js

@@ -121,7 +121,7 @@ async function runNextTask() {
 
 function testMaxDepth(task) {
 	const options = task.options;
-	return (options.crawlMaxDepth == 0 || task.depth < options.crawlMaxDepth) &&
+	return (options.crawlMaxDepth == 0 || task.depth <= options.crawlMaxDepth) &&
 		(options.crawlExternalLinksMaxDepth == 0 || task.externalLinkDepth < options.crawlExternalLinksMaxDepth);
 }