浏览代码

fixed depth test

Gildas 5 年之前
父节点
当前提交
dfd47fd95f
共有 1 个文件被更改,包括 1 次插入1 次删除
  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);
 }