Skip to content

Commit

Permalink
fix bug in massQueryGen
Browse files Browse the repository at this point in the history
Limit was being taken as 500 whenever batchSize was given.
  • Loading branch information
siddharthvp committed May 16, 2021
1 parent 8562c9d commit 640fbe3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1609,7 +1609,7 @@ export class mwn {
if (!Array.isArray(batchValues)) {
throw new Error(`massQuery: batch field in query must be an array`);
}
const limit = batchSize || this.hasApiHighLimit ? 500 : 50;
const limit = batchSize || (this.hasApiHighLimit ? 500 : 50);
const batches = arrayChunk(batchValues, limit);
const numBatches = batches.length;

Expand Down

0 comments on commit 640fbe3

Please sign in to comment.