should not run providers twice.

This commit is contained in:
Peng Lyu
2018-04-11 19:00:51 -07:00
parent 58a859e8c1
commit 05716c1812

View File

@@ -55,10 +55,12 @@ export class ExtHostComments implements ExtHostCommentsShape {
}
return asWinJsPromise(token => {
const allProviderResults = values(this._providers).map(provider => provider.provideComments(data.document, token));
return TPromise.join(allProviderResults);
let provider = this._providers.get(handle);
return provider.provideComments(data.document, token);
// const allProviderResults = values(this._providers).map(provider => provider.provideComments(data.document, token));
// return TPromise.join(allProviderResults);
})
.then(flatten)
// .then(flatten)
.then(comments => comments.map(x => convertCommentThread(x, this._commandsConverter)));
}
}