Here's where the error occurs (notice the *\ HERE ):
exports.checkRevision = checkRevision;// TODO: Remove this line and break up compilePartial
function template(templateSpec, env) {
/* istanbul ignore next */
if (!env) {
throw new Exception("No environment passed to template");
}
if (!templateSpec || !templateSpec.main) {
throw new Exception('Unknown template object: ' + typeof templateSpec); // *** HERE
}
// Note: Using env.VM references rather than local var references throughout this section to allow
// for external users to override these as psuedo-supported APIs.
env.VM.checkRevision(templateSpec.compiler);
The throw is legit, because the compiled template doesn't have the .main, here's the templateSpec value:
function (Handlebars,depth0,helpers,partials,data) {
this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
return "<!--\n Loading spinner (when checking user status)\n-->\n<div class=\"loading\">\n <i class=\"fa fa-spinner fa-spin checks-spinner\"></i>\n</div>";
}
Any idea on this? Many thanks and thanks again for this module.
Here's my HBS:
Here's how I am requiring it:
Here's where the error occurs (notice the *\ HERE ):
The throw is legit, because the compiled template doesn't have the .main, here's the
templateSpec
value:Any idea on this? Many thanks and thanks again for this module.