fix(paginator): empty when count equals button

pull/916/head
三咲智子 2023-01-10 01:22:20 +08:00
rodzic 8d77f9e9fb
commit 56ab163369
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 69992F2250DFD93E
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -67,7 +67,7 @@ export function usePaginator<T, P, U = T>(
if (!result.done && result.value.length) {
const preprocessedItems = preprocess([...nextItems.value, ...result.value] as (U | T)[])
const itemsToShowCount
= preprocessedItems.length < buffer
= preprocessedItems.length <= buffer
? preprocessedItems.length
: preprocessedItems.length - buffer
;(nextItems.value as U[]) = preprocessedItems.slice(itemsToShowCount)