X-Git-Url: https://git.squeep.com/?p=squeep-authentication-module;a=blobdiff_plain;f=lib%2Ftemplate%2Fia-html.js;fp=lib%2Ftemplate%2Fia-html.js;h=5de476ae04b880d2d94e6e3b1bd3db359aee2095;hp=00e2089338759627d26ace5ca8e8eeee2354ddcd;hb=2ca511865b0caf3108819cfd6ee775124ea70dff;hpb=8b998e55749e8613c0dece7a156b5edf83fb3608 diff --git a/lib/template/ia-html.js b/lib/template/ia-html.js index 00e2089..5de476a 100644 --- a/lib/template/ia-html.js +++ b/lib/template/ia-html.js @@ -2,6 +2,10 @@ const { TemplateHelper: th } = require('@squeep/html-template-helper'); +/** + * + * @returns {String} + */ function mainContent() { return [ `
@@ -31,7 +35,7 @@ module.exports = (ctx, options) => { ], }; // Ensure there is always an error to report, even if we do not have one, as we ended up here somehow. - if (!ctx.errors || !ctx.errors.length) { + if (!ctx?.errors?.length) { ctx.errors = [ 'Unknown Error — we are not sure what just happened', ];