Skip to content

Commit 862c0cd

Browse files
committed
fix: CronExpressionParser.#parseRepeat ranges parsing
1 parent 7e9bcac commit 862c0cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/CronExpressionParser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ export class CronExpressionParser {
339339
throw new Error(`Invalid repeat: ${val}`);
340340
}
341341
if (atoms.length === 2) {
342-
if (!isNaN(parseInt(atoms[0], 10))) {
342+
if (!atoms[0].includes('-')) {
343343
atoms[0] = `${atoms[0]}-${constraints.max}`;
344344
}
345345
return CronExpressionParser.#parseRange(field, atoms[0], parseInt(atoms[1], 10), constraints);

0 commit comments

Comments
 (0)