mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-29 10:06:13 +01:00
fix: prevent crash if items is undefined
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user