Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
islyn committed Mar 14, 2024
1 parent cc8d947 commit a52a4b2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions dest/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15234,7 +15234,7 @@ class DiffChecker {
const metrics = Object.keys(diffFileCoverageData);
let statusMessage = ` ${key.replace(this.currentDirectory, '')} `;
metrics.forEach(metric => {
if ('newPct' in diffFileCoverageData[metric]) {
if (typeof diffFileCoverageData[metric] === 'object') {
statusMessage += `| ${this.diffFileCoverageData[metric].newPct} `;
}
});
Expand Down Expand Up @@ -15377,7 +15377,7 @@ class DiffChecker {
}
let statusMessage = ` ${newCoverageStatusIcon} | **${fileNameUrl}** `;
metrics.forEach(metric => {
if ('newPct' in diffFileCoverageData[metric]) {
if (typeof diffFileCoverageData[metric] === 'object') {
statusMessage += `| **${diffFileCoverageData[metric].newPct}** `;
}
});
Expand All @@ -15388,7 +15388,7 @@ class DiffChecker {
} else if (fileRemovedCoverage) {
let statusMessage = ` ${removedCoverageIcon} | ~~${fileNameUrl}~~ `;
metrics.forEach(metric => {
if ('oldPct' in diffFileCoverageData[metric]) {
if (typeof diffFileCoverageData[metric] === 'object') {
statusMessage += `| ~~${diffFileCoverageData[metric].oldPct}~~ `;
}
});
Expand All @@ -15401,7 +15401,7 @@ class DiffChecker {
const statusIcon = this.getStatusIcon(diffFileCoverageData)
let statusMessage = ` ${statusIcon} | ${fileNameUrl} `;
metrics.forEach(metric => {
if ('newPct' in diffFileCoverageData[metric]) {
if (typeof diffFileCoverageData[metric] === 'object') {
statusMessage += `| ${diffFileCoverageData[metric].newPct} **(${this.getPercentageDiff(diffFileCoverageData[metric])})** `;
}
});
Expand Down
8 changes: 4 additions & 4 deletions src/DiffChecker.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export class DiffChecker {
const metrics = Object.keys(diffFileCoverageData);
let statusMessage = ` ${key.replace(this.currentDirectory, '')} `;
metrics.forEach(metric => {
if ('newPct' in diffFileCoverageData[metric]) {
if (typeof diffFileCoverageData[metric] === 'object') {
statusMessage += `| ${this.diffFileCoverageData[metric].newPct} `;
}
});
Expand Down Expand Up @@ -256,7 +256,7 @@ export class DiffChecker {
}
let statusMessage = ` ${newCoverageStatusIcon} | **${fileNameUrl}** `;
metrics.forEach(metric => {
if ('newPct' in diffFileCoverageData[metric]) {
if (typeof diffFileCoverageData[metric] === 'object') {
statusMessage += `| **${diffFileCoverageData[metric].newPct}** `;
}
});
Expand All @@ -267,7 +267,7 @@ export class DiffChecker {
} else if (fileRemovedCoverage) {
let statusMessage = ` ${removedCoverageIcon} | ~~${fileNameUrl}~~ `;
metrics.forEach(metric => {
if ('oldPct' in diffFileCoverageData[metric]) {
if (typeof diffFileCoverageData[metric] === 'object') {
statusMessage += `| ~~${diffFileCoverageData[metric].oldPct}~~ `;
}
});
Expand All @@ -280,7 +280,7 @@ export class DiffChecker {
const statusIcon = this.getStatusIcon(diffFileCoverageData)
let statusMessage = ` ${statusIcon} | ${fileNameUrl} `;
metrics.forEach(metric => {
if ('newPct' in diffFileCoverageData[metric]) {
if (typeof diffFileCoverageData[metric] === 'object') {
statusMessage += `| ${diffFileCoverageData[metric].newPct} **(${this.getPercentageDiff(diffFileCoverageData[metric])})** `;
}
});
Expand Down

0 comments on commit a52a4b2

Please sign in to comment.