Skip to content

Commit b676132

Browse files
committed
GraphQl-463: Query category for disabled catalog with products returns the product count
1 parent c47213a commit b676132

File tree

1 file changed

+2
-2
lines changed
  • app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function __construct(
8585
public function getTree(ResolveInfo $resolveInfo, int $rootCategoryId): \Iterator
8686
{
8787
$categoryQuery = $resolveInfo->fieldNodes[0];
88-
if ($this->isCategoryActive($rootCategoryId) == false) {
88+
if ($this->isCategoryActive($rootCategoryId) === false) {
8989
throw new GraphQlNoSuchEntityException(__('Category doesn\'t exist'));
9090
}
9191

@@ -155,7 +155,7 @@ private function joinAttributesRecursively(Collection $collection, FieldNode $fi
155155
*
156156
* @param int $rootCategoryId
157157
* @return bool
158-
* @throws \Exception
158+
* @throws \Magento\Framework\Exception\LocalizedException
159159
*/
160160
private function isCategoryActive(int $rootCategoryId) : bool
161161
{

0 commit comments

Comments
 (0)