diff --git a/server/src/diagnostics.ts b/server/src/diagnostics.ts index 3f2ce5f..0e60ee4 100644 --- a/server/src/diagnostics.ts +++ b/server/src/diagnostics.ts @@ -651,7 +651,14 @@ export class Diagnostics { } const diagnostics = this.diagnostics.get(textDocument) || [] - diagnostics.push(diagnostic) + + const duplicateDiagnostic = diagnostics.find((d) => { + return JSON.stringify(d) === JSON.stringify(diagnostic) + }) + + if(!duplicateDiagnostic) { + diagnostics.push(diagnostic) + } this.diagnostics.set(textDocument, diagnostics)