You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
if(typeof(arg)=="undefined")return"";
The text was updated successfully, but these errors were encountered:
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:The text was updated successfully, but these errors were encountered: