Skip to content

Commit 888c0b4

Browse files
committed
fixed behavior with not loaded collection
1 parent 40442d4 commit 888c0b4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2344,6 +2344,9 @@ public function addMediaGalleryData()
23442344
if (!$this->getSize()) {
23452345
return $this;
23462346
}
2347+
if (!$this->isLoaded()) {
2348+
$this->load();
2349+
}
23472350
$records = $this->getMediaGalleryResource()->getMediaRecords(
23482351
$this->getStoreId(),
23492352
$this->getLoadedIds()

0 commit comments

Comments
 (0)