handlebars-helpers
handlebars-helpers copied to clipboard
Subtract helper throws errors
As I understand it, by convention in handlebars, if a value doesn't exist the helper/value just just return an empty string. However in the case of the subtract helper if the value doesn't exist, it throws an error.
e.g.
Data
{
"value": 10
}
template
{{#if thing}}
{{subtract 20.00 thing}}
{{/if}}
throws an error because thing
is undefined. It should return ""