Skip to content

Commit

Permalink
fix lazy loading
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinGab committed Oct 14, 2024
1 parent 1fd0b16 commit 12accad
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Concerns/HasMedia.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ public function clearMediaCollection(

$media = $this->getMedia($collectionName, $collectionGroup)
->except($except)
->loadMissing(['conversions'])
->each(fn ($media) => $media->delete());

$this->setRelation(
Expand Down

0 comments on commit 12accad

Please sign in to comment.