Skip to content

Commit 6ef22a3

Browse files
committed
revert loading media PR
1 parent 6cebab8 commit 6ef22a3

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/InteractsWithMedia.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -546,11 +546,8 @@ public function loadMedia(string $collectionName): Collection
546546

547547
$collection = new MediaCollections\Models\Collections\MediaCollection($collection);
548548

549-
$modelWithoutMedia = (clone $this)->unsetRelation('media');
550-
551549
return $collection
552550
->filter(fn (Media $mediaItem) => $collectionName !== '*' ? $mediaItem->collection_name === $collectionName : true)
553-
->each(fn (Media $mediaItem) => $mediaItem->setRelation('model', $modelWithoutMedia))
554551
->sortBy('order_column')
555552
->values();
556553
}

0 commit comments

Comments
 (0)