fix(web): infinite scroll loop when there's only 1 page of notifications

This commit is contained in:
Pujit Mehrotra
2024-11-19 14:01:59 -05:00
parent 939d7a304d
commit eeb3289ae8

View File

@@ -56,7 +56,7 @@ async function onLoadMore() {
}, },
}); });
const incomingCount = incoming?.data.notifications.list.length ?? 0; const incomingCount = incoming?.data.notifications.list.length ?? 0;
if (incomingCount === 0) { if (incomingCount === 0 || incomingCount < props.pageSize) {
canLoadMore.value = false; canLoadMore.value = false;
} }
} }