Normally with Handlebars, a missing variable will result in nothing rendered and no error. For example if there is no variable x, and {{x}} is used in the template, then it will be as if the {{x}} was never included. However, if using an intl helper such as {{formatDate x}} or {{formatNumber x}} and there is no variable x, then an error will be raised, and the entire template will fail to render. Is this intentional? Can the helpers instead just render nothing? Perhaps those functions should start with something like:
Normally with Handlebars, a missing variable will result in nothing rendered and no error. For example if there is no variable
x
, and{{x}}
is used in the template, then it will be as if the{{x}}
was never included. However, if using an intl helper such as{{formatDate x}}
or{{formatNumber x}}
and there is no variablex
, then an error will be raised, and the entire template will fail to render. Is this intentional? Can the helpers instead just render nothing? Perhaps those functions should start with something like: