提交 19e74856 编写于 作者: M Matt Bierner

Make sure we don't set diagnostics in js/ts when validation is disabled

上级 310339fb
......@@ -423,16 +423,20 @@ class LanguageProvider {
}
public syntaxDiagnosticsReceived(file: string, diagnostics: Diagnostic[]): void {
this.syntaxDiagnostics[file] = diagnostics;
if (this._validate) {
this.syntaxDiagnostics[file] = diagnostics;
}
}
public semanticDiagnosticsReceived(file: string, diagnostics: Diagnostic[]): void {
const syntaxMarkers = this.syntaxDiagnostics[file];
if (syntaxMarkers) {
delete this.syntaxDiagnostics[file];
diagnostics = syntaxMarkers.concat(diagnostics);
if (this._validate) {
const syntaxMarkers = this.syntaxDiagnostics[file];
if (syntaxMarkers) {
delete this.syntaxDiagnostics[file];
diagnostics = syntaxMarkers.concat(diagnostics);
}
this.currentDiagnostics.set(this.client.asUrl(file), diagnostics);
}
this.currentDiagnostics.set(this.client.asUrl(file), diagnostics);
}
public configFileDiagnosticsReceived(file: string, diagnostics: Diagnostic[]): void {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册