Skip to content

Commit

Permalink
fix: date regex boolean check
Browse files Browse the repository at this point in the history
  • Loading branch information
joshcanhelp committed Nov 19, 2023
1 parent 9651b3b commit 5733bda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scripts/report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export interface Aggregate {
export const run = (config: Configuration, cliArgs: CommandArgs): void => {
const currentYear = new Date().getFullYear();
const getDate = (cliArgs.date || cliArgs.year || `${currentYear}`) as string;
if (!getDate || !!dateRegex.test(getDate)) {
if (!getDate || !dateRegex.test(getDate)) {
hardNo(`Invalid or missing date parameter: ${getDate}`);
}

Expand Down

0 comments on commit 5733bda

Please sign in to comment.