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 d09f87c commit 03daca9Copy full SHA for 03daca9
lib/open-report.js
@@ -38,9 +38,6 @@ const files = (report, predicate) => report.results
38
.map(result => resultToFile(result));
39
40
module.exports = report => {
41
- if (report.errorCount > 0) {
42
- openEditor(files(report, result => result.errorCount > 0));
43
- } else if (report.warningCount > 0) {
44
- openEditor(files(report, result => result.warningCount > 0));
45
- }
+ const count = report.errorCount > 0 ? 'errorCount' : 'warningCount';
+ openEditor(files(report, result => result[count] > 0));
46
};
0 commit comments