Fixing two more cases for promises in conditionals

This commit is contained in:
Matt Bierner 2021-02-26 17:38:37 -08:00
parent 3feb2ece1e
commit 1f567e10f3
2 changed files with 2 additions and 4 deletions

View file

@ -65,9 +65,7 @@ function getLanguageServiceHost(scriptKind: ts.ScriptKind) {
return compilerOptions; return compilerOptions;
}, },
dispose() { dispose() {
if (jsLanguageService) { jsLanguageService.then(s => s.dispose());
jsLanguageService.then(s => s.dispose());
}
} }
}; };
} }

View file

@ -355,7 +355,7 @@ class RequestRouter {
for (let serverIndex = 0; serverIndex < this.servers.length; ++serverIndex) { for (let serverIndex = 0; serverIndex < this.servers.length; ++serverIndex) {
const server = this.servers[serverIndex].server; const server = this.servers[serverIndex].server;
const request = server.executeImpl(command, args, { ...executeInfo, token }); const request = server.executeImpl(command, args, { ...executeInfo, token }) as Promise<ServerResponse.Response<Proto.Response>> | undefined;
if (serverIndex === 0) { if (serverIndex === 0) {
firstRequest = request; firstRequest = request;
} }