We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b1f0ef commit 154dff4Copy full SHA for 154dff4
app/code/Magento/PageBuilder/Model/Catalog/Sorting.php
@@ -85,12 +85,14 @@ public function applySorting(
85
\Magento\Catalog\Model\ResourceModel\Product\Collection $collection
86
): \Magento\Catalog\Model\ResourceModel\Product\Collection {
87
$sortBuilder = $this->getSortingInstance($option);
88
- $_collection = $sortBuilder->sort($collection);
+ if ($sortBuilder) {
89
+ $collection = $sortBuilder->sort($collection);
90
+ }
91
- if ($_collection->isLoaded()) {
- $_collection->clear();
92
+ if ($collection->isLoaded()) {
93
+ $collection->clear();
94
}
95
- return $_collection;
96
+ return $collection;
97
98
0 commit comments