Skip to content

Commit

Permalink
feat(Documents): Set SvgRenderers higher priority than ImageRenderer
Browse files Browse the repository at this point in the history
  • Loading branch information
roadiz-ci committed Apr 23, 2024
1 parent 8377b9b commit 580c71c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Models/DocumentTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ trait DocumentTrait
'image/heif' => 'image',
'image/jpeg' => 'image',
'image/png' => 'image',
'image/svg' => 'image',
'image/svg+xml' => 'image',
'image/tiff' => 'image',
'image/vnd.microsoft.icon' => 'image',
Expand Down Expand Up @@ -315,11 +316,7 @@ protected function initDocumentTrait(): void
]
public function isProcessable(): bool
{
if ($this->isImage() && in_array($this->getMimeType(), static::$processableMimeTypes)) {
return true;
}

return false;
return $this->isImage() && in_array($this->getMimeType(), static::$processableMimeTypes, true);
}

#[
Expand Down

0 comments on commit 580c71c

Please sign in to comment.