Skip to content

Commit cb782c8

Browse files
committed
Use Stock Config to get value.
StockHelper to filter collection for us.
1 parent c8b6de6 commit cb782c8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

app/code/Magento/ConfigurableProductGraphQl/Model/Resolver/ConfigurableVariant.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,7 @@ public function resolve(Field $field, $context, ResolveInfo $info, array $value
9595
$variants = [];
9696
/** @var Product $child */
9797
foreach ($children as $key => $child) {
98-
if($child != null) {
99-
$variants[$key] = ['sku' => $child['sku'], 'product' => $child, 'options' => $options];
100-
}
98+
$variants[$key] = ['sku' => $child['sku'], 'product' => $child, 'options' => $options];
10199
}
102100

103101
return $variants;

0 commit comments

Comments
 (0)