Skip to content

Commit a08d497

Browse files
committed
Remove redundant COUNT() call for 1st page of results
1 parent dfe7b89 commit a08d497

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Theme/Plugin/Data/Collection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Collection
2323
*/
2424
public function afterGetCurPage(DataCollection $subject, int $result): int
2525
{
26-
if ($result > $subject->getLastPageNumber()) {
26+
if ($result > 1 && $result > $subject->getLastPageNumber()) {
2727
$result = 1;
2828
}
2929

0 commit comments

Comments
 (0)