From 614969baa770360b711881a3d9776d60937c98db Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Sat, 13 Aug 2022 20:49:00 +0200 Subject: [PATCH] Pad empty diagnostic messages in relatedInformation as well --- editors/code/src/client.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/editors/code/src/client.ts b/editors/code/src/client.ts index 40ba17844be..27ab31db8db 100644 --- a/editors/code/src/client.ts +++ b/editors/code/src/client.ts @@ -111,6 +111,13 @@ export async function createClient( if (!diagnostic.message) { diagnostic.message = " "; } + if (diagnostic.relatedInformation) { + for (const relatedInformation of diagnostic.relatedInformation) { + if (!relatedInformation.message) { + relatedInformation.message = " "; + } + } + } } next(uri, diagnostics); },