Skip to content

Commit

Permalink
Fix issue with LightboxSpatieMediaLibraryImageEntry when no conversio…
Browse files Browse the repository at this point in the history
…n is set
  • Loading branch information
notFloran committed Nov 7, 2024
1 parent f6dfceb commit aa3e869
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Infolists/LightboxSpatieMediaLibraryImageEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected function makeLightboxEntryFromMedia(Media $media): LightboxImageEntry

if ($this->getVisibility() === 'private') {
try {
if ($this->getConversion() && $media->hasGeneratedConversion($this->getConversion())) {
if (filled($this->getConversion()) && $media->hasGeneratedConversion($this->getConversion())) {
$entry->state($media->getTemporaryUrl(now()->addMinutes(5), $this->getConversion()));
} else {
$entry->state($media->getTemporaryUrl(now()->addMinutes(5)));
Expand All @@ -51,7 +51,7 @@ protected function makeLightboxEntryFromMedia(Media $media): LightboxImageEntry
// This driver does not support creating temporary URLs.
}
} else {
if ($this->getConversion() && $media->hasGeneratedConversion($this->getConversion())) {
if (filled($this->getConversion()) && $media->hasGeneratedConversion($this->getConversion())) {
$entry->state($media->getFullUrl($this->getConversion()));
} else {
$entry->state($media->getFullUrl());
Expand Down

0 comments on commit aa3e869

Please sign in to comment.