fix: prevent crash if items is undefined

This commit is contained in:
Barış Soner Uşaklı
2024-09-09 14:04:11 -04:00
parent 6010b72d71
commit a80e314169

View File

@@ -370,7 +370,7 @@ Helpers.generateCollection = async ({ set, method, page, perPage, url }) => {
}
const count = await db.sortedSetCard(set);
const pageCount = Math.max(1, Math.ceil(count / perPage));
let items;
let items = [];
let paginate = true;
if (!page && pageCount === 1) {