提交 55513dee 编写于 作者: M Matt Bierner

Fix #16432 - rejected promise not handled

Fixes #16432

Introducing during null check refeactoring. Before the promise was set to null inside the promise. I added a rejection because the promise value should never be used before that point, but it seems that introduced a regression.

Fix is to use `p` inside of the promise instead.
上级 d1677286
......@@ -114,8 +114,8 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient
this.globalState = globalState;
this.pathSeparator = path.sep;
let p = new Promise<void>((resolve, reject) => {
this._onReady = { promise: Promise.reject<void>(null), resolve, reject };
const p = new Promise<void>((resolve, reject) => {
this._onReady = { promise: p, resolve, reject };
});
this._onReady.promise = p;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册