- ${ctx.subscriptions.length ? ctx.subscriptions.length : 'no'} subscription${(ctx.subscriptions.length === 1) ? '' : 's'}
-
+ ${ctx.subscriptions.length ? ctx.subscriptions.length : 'no'} subscription${(ctx.subscriptions.length === 1) ? '' : 's'}
`,
+ ...(ctx.subscriptions.length && [`
+
+ `] || []),
+ `
`,
th.renderSubscriptionRowHeader(),
`
`,
- ...(ctx.subscriptions && ctx.subscriptions.map(th.renderSubscriptionRow)),
+ ...((ctx?.subscriptions || []).map(th.renderSubscriptionRow)),
`
`,
];
- return th.htmlPage(2, ctx, htmlOptions, content);
+ return th.htmlPage(pagePathLevel, ctx, htmlOptions, content);
};
\ No newline at end of file