Skip to content

Commit 02aa0fe

Browse files
committed
messed up commit
1 parent 2859ae6 commit 02aa0fe

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

app/code/Magento/CatalogGraphQl/Model/Resolver/CategoryTree.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
namespace Magento\CatalogGraphQl\Model\Resolver;
99

10+
use Magento\Catalog\Model\Category;
1011
use Magento\CatalogGraphQl\Model\Resolver\Category\CheckCategoryIsActive;
1112
use Magento\CatalogGraphQl\Model\Resolver\Products\DataProvider\ExtractDataFromCategoryTree;
1213
use Magento\Framework\GraphQl\Config\Element\Field;
@@ -66,8 +67,10 @@ public function resolve(Field $field, $context, ResolveInfo $info, array $value
6667

6768
$rootCategoryId = isset($args['id']) ? (int)$args['id'] :
6869
(int)$context->getExtensionAttributes()->getStore()->getRootCategoryId();
69-
$this->checkCategoryIsActive->execute($rootCategoryId);
7070

71+
if ($rootCategoryId !== Category::TREE_ROOT_ID) {
72+
$this->checkCategoryIsActive->execute($rootCategoryId);
73+
}
7174
$categoriesTree = $this->categoryTree->getTree($info, $rootCategoryId);
7275

7376
if (empty($categoriesTree) || ($categoriesTree->count() == 0)) {

app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider/CategoryTree.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,6 @@ private function joinAttributesRecursively(Collection $collection, FieldNode $fi
140140
if ($node->kind === 'InlineFragment') {
141141
continue;
142142
}
143-
if ($node->kind === 'FragmentSpread') {
144-
continue;
145-
}
146143

147144
$this->joinAttributesRecursively($collection, $node);
148145
}

0 commit comments

Comments
 (0)