Fix note max page

This commit is contained in:
Tarrgon
2025-10-03 11:08:20 -04:00
parent 241884865c
commit 433ed278a8
+1 -1
View File
@@ -15,7 +15,7 @@ export async function getNoteMessage(userId: string, page: number): Promise<Mess
page = page - 1; page = page - 1;
const maxPage = Math.floor(notes.length / NOTES_PER_PAGE); const maxPage = Math.max(0, Math.ceil(notes.length / NOTES_PER_PAGE) - 1);
if (notes.length == 0) return null; if (notes.length == 0) return null;