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(
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 ;
You can’t perform that action at this time.
0 commit comments