mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-09-24 19:08:16 +00:00
ThreadItem: Remove redundant check
CommentItem::getAuthor() used to return null in the past. Change-Id: I66f4e83b51b6efef7441d4b963f6db09571d9393
This commit is contained in:
parent
49aacb31e6
commit
317c608eda
|
@ -65,10 +65,7 @@ abstract class ThreadItem implements JsonSerializable {
|
|||
$authors = [];
|
||||
$getAuthorSet = static function ( ThreadItem $comment ) use ( &$authors, &$getAuthorSet ) {
|
||||
if ( $comment instanceof CommentItem ) {
|
||||
$author = $comment->getAuthor();
|
||||
if ( $author ) {
|
||||
$authors[ $author ] = true;
|
||||
}
|
||||
$authors[ $comment->getAuthor() ] = true;
|
||||
}
|
||||
// Get the set of authors in the same format from each reply
|
||||
array_map( $getAuthorSet, $comment->getReplies() );
|
||||
|
|
Loading…
Reference in a new issue