diff options
| author | DivisionByZero <[email protected]> | 2023-01-22 16:17:40 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-01-22 15:17:40 +0000 |
| commit | ee94f3ec6e8eca45043ac79e90cbaee38090606c (patch) | |
| tree | 18ad972888b19a3c1710ff11eb6cfad0066b649a /src | |
| parent | 88d83929b78f0a18abc42e8ae6e783d79b32aec3 (diff) | |
| download | faker-ee94f3ec6e8eca45043ac79e90cbaee38090606c.tar.xz faker-ee94f3ec6e8eca45043ac79e90cbaee38090606c.zip | |
refactor(git): commitDate explicitly set default for refDate (#1750)
Diffstat (limited to 'src')
| -rw-r--r-- | src/modules/git/index.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/git/index.ts b/src/modules/git/index.ts index 1f6d366f..76e786ab 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 }) |
