diff --git a/lib/swag.js b/lib/swag.js index b247950..d5e5ad2 100644 --- a/lib/swag.js +++ b/lib/swag.js @@ -1032,12 +1032,14 @@ }; Swag.addHelper('ul', function(context, options) { + if (Utils.isUndefined(context)) { return ""; } return (""; }); Swag.addHelper('ol', function(context, options) { + if (Utils.isUndefined(context)) { return "
    "; } return ("
      ") + context.map(function(item) { return "
    1. " + (options.fn(Utils.result(item))) + "
    2. "; }).join('\n') + "
    ";