refactor(localize): remove unnecessary ! operator (#38082)
The messages property always exists so there is no need for the ! operator. PR Close #38082
This commit is contained in:
parent
6c9401c338
commit
56dd3e77ac
|
@ -35,8 +35,8 @@ export class Diagnostics {
|
|||
this.messages.push(...other.messages);
|
||||
}
|
||||
formatDiagnostics(message: string): string {
|
||||
const errors = this.messages!.filter(d => d.type === 'error').map(d => ' - ' + d.message);
|
||||
const warnings = this.messages!.filter(d => d.type === 'warning').map(d => ' - ' + d.message);
|
||||
const errors = this.messages.filter(d => d.type === 'error').map(d => ' - ' + d.message);
|
||||
const warnings = this.messages.filter(d => d.type === 'warning').map(d => ' - ' + d.message);
|
||||
if (errors.length) {
|
||||
message += '\nERRORS:\n' + errors.join('\n');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue