Skip to content

Commit

Permalink
fix: address review
Browse files Browse the repository at this point in the history
  • Loading branch information
wooneusean committed Mar 17, 2023
1 parent 2983a8e commit a232d3d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/modules/helpers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,13 @@ function getRepetitionsBasedOnQuantifierParameters(
default:
throw new FakerError('Unknown quantifier symbol provided.');
}
} else if (quantifierMin && quantifierMax) {
} else if (quantifierMin != null && quantifierMax != null) {
repetitions = faker.number.int({
min: parseInt(quantifierMin),
max: parseInt(quantifierMax),
});
} else if (quantifierMin && !quantifierMax) {
} else if (quantifierMin != null && quantifierMax == null) {
repetitions = parseInt(quantifierMin);
} else {
repetitions = 1;
}

return repetitions;
Expand Down

0 comments on commit a232d3d

Please sign in to comment.