mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
fix comments npe
This commit is contained in:
@@ -270,12 +270,12 @@ function convertToComment(provider: vscode.DocumentCommentProvider | vscode.Work
|
||||
canDelete: canDelete,
|
||||
command: vscodeComment.command ? commandsConverter.toInternal(vscodeComment.command) : null,
|
||||
isDraft: vscodeComment.isDraft,
|
||||
commentReactions: vscodeComment.commentReactions.map(reaction => {
|
||||
commentReactions: vscodeComment.commentReactions ? vscodeComment.commentReactions.map(reaction => {
|
||||
return {
|
||||
label: reaction.label,
|
||||
hasReacted: reaction.hasReacted,
|
||||
canEdit: (reaction.hasReacted && providerCanDeleteReaction) || (!reaction.hasReacted && providerCanAddReaction)
|
||||
};
|
||||
})
|
||||
}) : undefined
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user