Merge "ThreadItem.js: Only search CommentItem's for authors"

This commit is contained in:
jenkins-bot 2022-05-31 20:22:56 +00:00 committed by Gerrit Code Review
commit 2dde6572f5

View file

@ -114,7 +114,9 @@ ThreadItem.static.newFromJSON = function ( json ) {
ThreadItem.prototype.getAuthorsBelow = function () {
var authors = {};
function getAuthorSet( comment ) {
if ( comment.type === 'comment' ) {
authors[ comment.author ] = true;
}
// Get the set of authors in the same format from each reply
comment.replies.forEach( getAuthorSet );
}