fix tests for accompanying period comments

This commit is contained in:
2022-02-11 13:36:35 +01:00
parent 199a441593
commit 9b4c350213
2 changed files with 16 additions and 12 deletions

View File

@@ -1153,11 +1153,8 @@ class AccompanyingPeriod implements
$this->removeComment($this->pinnedComment);
}
if ($comment instanceof Comment) {
if (null !== $this->pinnedComment) {
$this->addComment($this->pinnedComment);
}
$this->addComment($comment);
if (null !== $this->pinnedComment) {
$this->addComment($this->pinnedComment);
}
$this->pinnedComment = $comment;