Skip to content

Commit 83e1db6

Browse files
committed
fix: don't say we're showing more results than we are!
1 parent 96a4969 commit 83e1db6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

app/components/Package/ListToolbar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ function getSortKeyLabelKey(key: SortKey): string {
146146
$t(
147147
'filters.count.showing_paginated',
148148
{
149-
pageSize: pageSize === 'all' ? $n(filteredCount) : pageSize,
149+
pageSize: pageSize === 'all' ? $n(filteredCount) : Math.min(pageSize, filteredCount),
150150
count: $n(filteredCount),
151151
},
152152
filteredCount,

app/pages/search.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,10 @@ defineOgImageComponent('Default', {
654654
$t(
655655
'filters.count.showing_paginated',
656656
{
657-
pageSize: preferredPageSize === 'all' ? $n(effectiveTotal) : preferredPageSize,
657+
pageSize:
658+
preferredPageSize === 'all'
659+
? $n(effectiveTotal)
660+
: Math.min(preferredPageSize, effectiveTotal),
658661
count: $n(effectiveTotal),
659662
},
660663
effectiveTotal,

0 commit comments

Comments
 (0)