We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f46f91f commit daa97c2Copy full SHA for daa97c2
src/utils/config.ts
@@ -91,12 +91,14 @@ export const getConfiguration = (): Configuration => {
91
}
92
93
if (typeof mergedConfig.outputFile === "object") {
94
- const reportYear =
95
- (year as string) || date
96
- ? (date as string).split("-")[0]
97
- : new Date().getFullYear();
98
-
99
- return mergedConfig.outputFile[reportYear];
+ let reportYear = (new Date().getFullYear()).toString();
+ if (year) {
+ reportYear = (year as string);
+ } else if (date) {
+ reportYear = (date as string).split("-")[0];
+ }
100
+
101
+ return mergedConfig.outputFile[reportYear] || defaultConfig.outputFile;
102
103
104
return defaultConfig.outputFile;
0 commit comments