Skip to content

Commit efa9e7b

Browse files
author
cnorris
committed
Fix maxlimit validation logic to correctly handle maxLimit:0 case
1 parent bf3db15 commit efa9e7b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Config.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,8 @@ export class Config {
225225
}
226226

227227
static validateMaxLimit(maxLimit) {
228-
if (maxLimit) {
229-
if (maxLimit <= 0) {
230-
throw 'Max limit must be a value greater than 0.'
231-
}
228+
if (maxLimit <= 0) {
229+
throw 'Max limit must be a value greater than 0.'
232230
}
233231
}
234232

0 commit comments

Comments
 (0)