From ee94f3ec6e8eca45043ac79e90cbaee38090606c Mon Sep 17 00:00:00 2001 From: DivisionByZero Date: Sun, 22 Jan 2023 16:17:40 +0100 Subject: [PATCH] refactor(git): commitDate explicitly set default for refDate (#1750) --- src/modules/git/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/git/index.ts b/src/modules/git/index.ts index 1f6d366fa3f..76e786ab9b6 100644 --- a/src/modules/git/index.ts +++ b/src/modules/git/index.ts @@ -161,7 +161,7 @@ export class GitModule { refDate?: string | Date | number; } = {} ): string { - const { refDate } = options; + const { refDate = new Date() } = options; const dateParts = GIT_DATE_FORMAT_BASE.format( this.faker.date.recent({ days: 1, refDate })