Skip to content

Commit

Permalink
feat: ensure that limit is integer
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Dec 10, 2020
1 parent 273615e commit de438b9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/factories/createPlanton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ const createPlanton = (configuration: PlantonConfiguration): Planton => {
throw new UnexpectedStateError('Limit cannot be less than 0.');
}

if (!Number.isInteger(limit)) {
throw new UnexpectedStateError('Limit must be an integer.');
}

try {
taskInstructions = await inputTask.schedule({
activeTaskInstructions,
Expand Down

0 comments on commit de438b9

Please sign in to comment.