提交 8324ab0c 编写于 作者: D Dirk Baeumer

Fix #5015: Cannot read property 'then' of null

上级 a12ea135
......@@ -89,6 +89,9 @@ export default class BufferSyncSupport {
this.diagnosticDelayer = new Delayer<any>(100);
this.syncedBuffers = Object.create(null);
}
public listen(): void {
workspace.onDidOpenTextDocument(this.onDidAddDocument, this, this.disposables);
workspace.onDidCloseTextDocument(this.onDidRemoveDocument, this, this.disposables);
workspace.onDidChangeTextDocument(this.onDidChangeDocument, this, this.disposables);
......
......@@ -107,6 +107,7 @@ class LanguageProvider {
client.onReady().then(() => {
this.registerProviders(client);
this.bufferSyncSupport.listen();
}, () => {
// Nothing to do here. The client did show a message;
});
......@@ -241,7 +242,6 @@ class LanguageProvider {
this.syntaxDiagnostics = Object.create(null);
this.bufferSyncSupport.reOpenDocuments();
this.bufferSyncSupport.requestAllDiagnostics();
}
public triggerAllDiagnostics(): void {
......
......@@ -204,7 +204,6 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient
});
} catch (error) {
reject(error);
this._onReady.reject();
}
});
this.serviceStarted(resendModels);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册