Do not output summary if theres nothing to report

This commit is contained in:
Wesley Wigham 2018-11-07 15:46:13 -08:00
parent 15af7e17c6
commit 6ad58b242e
No known key found for this signature in database
GPG key ID: D59F87F60C5400C9

View file

@ -117,6 +117,7 @@ namespace ts {
}
export function getErrorSummaryText(errorCount: number, newLine: string) {
if (errorCount === 0) return "";
const d = createCompilerDiagnostic(errorCount === 1 ? Diagnostics.Found_1_error : Diagnostics.Found_0_errors, errorCount);
return `${newLine}${flattenDiagnosticMessageText(d.messageText, newLine)}${newLine}${newLine}`;
}