Skip to content

Commit 1400421

Browse files
committed
fix: use nullish coalescing for coverage directory paths
1 parent b7e27ef commit 1400421

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/karma-typescript/src/karma/reporter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,12 @@ export class Reporter {
106106
private getReportDestination(browser: any, reportConfig: any, reportType: any) {
107107

108108
if (lodash.isPlainObject(reportConfig)) {
109-
let subdirectory = reportConfig.subdirectory || browser.name;
109+
let subdirectory = reportConfig.subdirectory ?? browser.name;
110110
if (typeof subdirectory === "function") {
111111
subdirectory = subdirectory(browser);
112112
}
113113

114-
return path.join(reportConfig.directory || "coverage", subdirectory);
114+
return path.join(reportConfig.directory ?? "coverage", subdirectory);
115115
}
116116

117117
if (lodash.isString(reportConfig) && reportConfig.length > 0) {

0 commit comments

Comments
 (0)