perf(web): свод 2 — правка по biome (pages.at(-1))
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
a9a05c2360
commit
900a3c6535
@ -31,7 +31,7 @@ export function getWindowPages(visiblePage, total) {
|
||||
export function getWindowRange(pages, total) {
|
||||
if (pages.length === 0) return { windowStart: 0, windowEnd: 0 };
|
||||
const first = pages[0];
|
||||
const last = pages[pages.length - 1];
|
||||
const last = pages.at(-1);
|
||||
return { windowStart: first * PAGE_SIZE, windowEnd: Math.min(total, (last + 1) * PAGE_SIZE) };
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user