Skip to content

Commit 30c79f3

Browse files
author
dnyomo
committed
Removed bad code that was not needed
1 parent aad9bff commit 30c79f3

File tree

1 file changed

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

1 file changed

+0
-8
lines changed

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -162,17 +162,9 @@ private function getSortOrderArray(SearchCriteriaInterface $searchCriteria, $arg
162162
foreach ($sortOrders as $sortOrder) {
163163
if ($sortOrder->getField() === '_id') {
164164
$sortOrder->setField('entity_id');
165-
$categoryIdFilter = isset($args['filter']['category_id']) ? $args['filter']['category_id'] : false;
166-
if ($categoryIdFilter && count($categoryIdFilter[array_key_first($categoryIdFilter)]) <= 1) {
167-
$sortOrder->setDirection(SortOrder::SORT_ASC);
168-
}
169165
}
170166
$ordersArray[$sortOrder->getField()] = $sortOrder->getDirection();
171167
}
172-
if (isset($ordersArray[EavAttributeInterface::POSITION])) {
173-
$ordersArray['entity_id'] = $ordersArray[EavAttributeInterface::POSITION];
174-
unset($ordersArray[EavAttributeInterface::POSITION]);
175-
}
176168
}
177169

178170
return $ordersArray;

0 commit comments

Comments
 (0)