Skip to content

Commit 97b1279

Browse files
committed
LYNX-503 - Feedback fix
1 parent d0bc259 commit 97b1279

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

app/code/Magento/GroupedProductGraphQl/Plugin/Model/Resolver/ProductImagePlugin.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,12 @@ public function afterResolve(
9797
private function updateThumbnailToParentThumbnail(Item $cartItem, array $returnArray): array
9898
{
9999
foreach ($cartItem->getOptions() as $option) {
100-
if ($option->getProduct()->getTypeId() !== self::PRODUCT_TYPE_GROUPED) {
101-
continue;
102-
}
103-
104100
$parentProduct = $option->getProduct();
105-
if ($parentProduct && $parentProduct->getThumbnail()) {
101+
102+
if ($parentProduct->getTypeId() === self::PRODUCT_TYPE_GROUPED && $parentProduct->getThumbnail()) {
106103
$returnArray['model']['thumbnail'] = $parentProduct->getThumbnail();
104+
break;
107105
}
108-
break;
109106
}
110107

111108
return $returnArray;

0 commit comments

Comments
 (0)