Unnamed repository; edit this file 'description' to name the repository.
Auto merge of #13017 - Veykril:vscode-diag-workaround, r=Veykril
Pad empty diagnostic messages in relatedInformation as well Follw up to https://github.com/rust-lang/rust-analyzer/pull/13016
bors 2022-08-14
parent bbe5637 · parent 614969b · commit 010f68c
-rw-r--r--editors/code/src/client.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/editors/code/src/client.ts b/editors/code/src/client.ts
index 40ba17844b..27ab31db8d 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);
},