Skip to content

Commit 67d6a65

Browse files
committed
B2B-2469: Improve category children loading
- functional fixes
1 parent 0a8b32b commit 67d6a65

File tree

1 file changed

+1
-4
lines changed
  • app/code/Magento/CatalogGraphQl/Model/Resolver/Categories/DataProvider/Category/CollectionProcessor

1 file changed

+1
-4
lines changed

app/code/Magento/CatalogGraphQl/Model/Resolver/Categories/DataProvider/Category/CollectionProcessor/CatalogProcessor.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,7 @@ public function process(
6363
): Collection {
6464
$this->collectionProcessor->process($searchCriteria, $collection);
6565
$store = $context->getExtensionAttributes()->getStore();
66-
$category = $collection->getItemById($store->getRootCategoryId());
67-
if (!$category instanceof Category) {
68-
$category = $this->categoryRepository->get($store->getRootCategoryId());
69-
}
66+
$category = $this->categoryRepository->get($store->getRootCategoryId());
7067
$this->addRootCategoryFilterForStoreByPath($collection, $category->getPath());
7168
return $collection;
7269
}

0 commit comments

Comments
 (0)