${ctx.topics.length ? ctx.topics.length : 'no'} topic${(ctx.topics.length === 1) ? '' : 's'}
@@ -34,11 +38,11 @@ module.exports = (ctx, options) => {
th.renderTopicRowHeader(),
`
`,
- ...(ctx.topics && ctx.topics.map((topic) => th.renderTopicRow(topic, { length: topic.subscribers }))),
+ ...((ctx?.topics || []).map((topic) => th.renderTopicRow(topic, { length: topic.subscribers }))),
`
`,
];
- return th.htmlPage(1, ctx, htmlOptions, content);
+ return th.htmlPage(pagePathLevel, ctx, htmlOptions, content);
};
\ No newline at end of file