Use 'append' helper (#21101)

This commit is contained in:
Andy
2018-01-10 11:13:47 -08:00
committed by GitHub
parent 743d8dbe0a
commit ddd8e759c1

View File

@@ -786,15 +786,7 @@ namespace ts {
const comments = getJSDocCommentRanges(node, sourceFile.text);
if (comments) {
for (const comment of comments) {
const jsDoc = JSDocParser.parseJSDocComment(node, comment.pos, comment.end - comment.pos);
if (jsDoc) {
if (!node.jsDoc) {
node.jsDoc = [jsDoc];
}
else {
node.jsDoc.push(jsDoc);
}
}
node.jsDoc = append(node.jsDoc, JSDocParser.parseJSDocComment(node, comment.pos, comment.end - comment.pos));
}
}