null check

This commit is contained in:
Peng Lyu
2018-04-23 10:09:13 -07:00
parent 16041530c2
commit faa4bd1fff
5 changed files with 68 additions and 2 deletions

View File

@@ -73,7 +73,7 @@ export class ExtHostComments implements ExtHostCommentsShape {
let provider = this._documentProviders.get(handle);
return provider.provideDocumentComments(data.document, token);
})
.then(commentInfo => convertCommentInfo(handle, commentInfo, this._commandsConverter));
.then(commentInfo => commentInfo ? convertCommentInfo(handle, commentInfo, this._commandsConverter) : null);
}
$provideWorkspaceComments(handle: number): TPromise<modes.CommentThread[]> {