dedupe
This commit is contained in:
@ -104,7 +104,9 @@ export default class EditorManager {
|
|||||||
addDiagnostics(diagnostics: Diagnostic[]): void {
|
addDiagnostics(diagnostics: Diagnostic[]): void {
|
||||||
if (!this.editorView) return
|
if (!this.editorView) return
|
||||||
forEachDiagnostic(this.editorView.state, function (diag) {
|
forEachDiagnostic(this.editorView.state, function (diag) {
|
||||||
|
if (!diagnostics.contains(diag)) {
|
||||||
diagnostics.push(diag)
|
diagnostics.push(diag)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
this.editorView.dispatch(setDiagnostics(this.editorView.state, diagnostics))
|
this.editorView.dispatch(setDiagnostics(this.editorView.state, diagnostics))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user