diff --git a/plugins/generic/htmlArticleGalley/HtmlArticleGalleyPlugin.php b/plugins/generic/htmlArticleGalley/HtmlArticleGalleyPlugin.php
index b570934b0f0..39e068930ac 100644
--- a/plugins/generic/htmlArticleGalley/HtmlArticleGalleyPlugin.php
+++ b/plugins/generic/htmlArticleGalley/HtmlArticleGalleyPlugin.php
@@ -81,17 +81,11 @@ public function articleViewCallback($hookName, $args)
{
$request = & $args[0];
$issue = & $args[1];
+ /** @var \PKP\galley\Galley */
$galley = & $args[2];
$article = & $args[3];
- if (!$galley) {
- return false;
- }
-
- $submissionFile = $galley->getFile();
- /** @var ?Publication */
- $galleyPublication = null;
- if ($submissionFile->getData('mimetype') === 'text/html') {
+ if ($galley && $galley->getFileType() === 'text/html') {
/** @var ?Publication */
$galleyPublication = null;
foreach ($article->getData('publications') as $publication) {
@@ -107,7 +101,7 @@ public function articleViewCallback($hookName, $args)
'galley' => $galley,
'isLatestPublication' => $article->getData('currentPublicationId') === $galley->getData('publicationId'),
'galleyPublication' => $galleyPublication,
- 'submissionFile' => $submissionFile,
+ 'submissionFile' => $galley->getFile(),
]);
$templateMgr->display($this->getTemplateResource('display.tpl'));