File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
app/code/Magento/GroupedProductGraphQl/Plugin/Model/Resolver Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -97,15 +97,12 @@ public function afterResolve(
97
97
private function updateThumbnailToParentThumbnail (Item $ cartItem , array $ returnArray ): array
98
98
{
99
99
foreach ($ cartItem ->getOptions () as $ option ) {
100
- if ($ option ->getProduct ()->getTypeId () !== self ::PRODUCT_TYPE_GROUPED ) {
101
- continue ;
102
- }
103
-
104
100
$ parentProduct = $ option ->getProduct ();
105
- if ($ parentProduct && $ parentProduct ->getThumbnail ()) {
101
+
102
+ if ($ parentProduct ->getTypeId () === self ::PRODUCT_TYPE_GROUPED && $ parentProduct ->getThumbnail ()) {
106
103
$ returnArray ['model ' ]['thumbnail ' ] = $ parentProduct ->getThumbnail ();
104
+ break ;
107
105
}
108
- break ;
109
106
}
110
107
111
108
return $ returnArray ;
You can’t perform that action at this time.
0 commit comments