Skip to content

Commit

Permalink
Use a more precise method to access ArticleVersion's elife assessment…
Browse files Browse the repository at this point in the history
… article version

elifesciences/issues#9034
  • Loading branch information
LinaKind committed Dec 12, 2024
1 parent fd4fdfd commit a9e17fc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/Controller/ArticlesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -634,8 +634,8 @@ private function createFirstPage(Request $request, string $id, array $arguments)
$item = $parts['item'];
/** @var array $context */
$context = $parts['context'];
if ($item instanceof ArticleVoR && $item->getElifeAssessment()) {
$elifeAssessment = $item->getElifeAssessment();
if ($item instanceof ArticleVoR && $item->getElifeAssessmentArticleSection()) {
$elifeAssessment = $item->getElifeAssessmentArticleSection();
$elifeAssessmentTitle = $item->getElifeAssessmentTitle();
return ArticleSection::basic(
$this->render(...$this->convertContent($elifeAssessment, 2, $context)),
Expand Down

0 comments on commit a9e17fc

Please sign in to comment.