Skip to content

Commit

Permalink
Merge pull request #37 from manfield/main
Browse files Browse the repository at this point in the history
Fixes #36
  • Loading branch information
pxpm authored Oct 4, 2024
2 parents c355d32 + 9c13b6b commit 267e1a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Uploaders/MediaUploader.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,9 @@ public function getMediaIdentifier($media, $entry = null)
$path = PathGeneratorFactory::create($media);

if ($entry && ! empty($entry->mediaConversions)) {
$conversion = array_filter($entry->mediaConversions, function ($item) use ($media) {
$conversion = array_values(array_filter($entry->mediaConversions, function ($item) use ($media) {
return $item->getName() === $this->getConversionToDisplay($media);
})[0] ?? null;
}))[0] ?? null;

if (! $conversion) {
return $path->getPath($media).$media->file_name;
Expand Down

0 comments on commit 267e1a2

Please # to comment.