16
I have a custom helper, as follows:
Handlebars.registerHelper('hasAccess', function(val, fnTrue, fnFalse) {
return val > 5 ? fnTrue() : fnFalse();
});
and my template, as follows:
{{#hasAccess this.access}}
You have access!
{{else}}
You do not have access
{{/hasAccess}}
It works, except fnFalse is undefined. So, how am I supposed to render the 'else' branch?