Skip to content

Commit e988cd0

Browse files
committed
pagination fix
1 parent de53657 commit e988cd0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

frontend/src/components/Pagination.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
itemName = 'items',
2424
}: Props = $props();
2525
26-
const start = $derived((currentPage - 1) * pageSize + 1);
26+
const start = $derived(Math.min((currentPage - 1) * pageSize + 1, totalItems));
2727
const end = $derived(Math.min(currentPage * pageSize, totalItems));
2828
</script>
2929

0 commit comments

Comments
 (0)