Better loop condition

This commit is contained in:
roblou 2016-11-30 17:29:11 -08:00
parent 2304053ee9
commit 3638b3cf88

View file

@ -102,7 +102,7 @@ function searchBatch(absolutePaths: string[], contentPattern: RegExp, fileEncodi
};
let batchPromises: TPromise<void>[] = [];
for (let i = 0; i < SearchWorker.CONCURRENT_SEARCH_PATHS && i < absolutePaths.length; i++) {
for (let i = 0; i < SearchWorker.CONCURRENT_SEARCH_PATHS && absolutePaths.length; i++) {
batchPromises.push(startSearchInFile(absolutePaths.shift()));
}