fix toggle help in presence of errors

This commit is contained in:
Jon Eugster
2023-07-19 00:13:01 +02:00
parent fb2f9cc3aa
commit eb799e1078
2 changed files with 10 additions and 8 deletions
@@ -335,7 +335,7 @@ export function hasErrors(diags: Diagnostic[]) {
// TODO: Didn't manage to unify this with the one above
export function hasInteractiveErrors (diags: InteractiveDiagnostic[]) {
return diags.some(
return (typeof diags !== 'undefined') && diags.some(
(d) => (d.severity == DiagnosticSeverity.Error ) // || d.severity == DiagnosticSeverity.Warning
)
}