{{ 'foo' if false }}
shortcut not usable with StrictUndefined
#710
Milestone
{{ 'foo' if false }}
shortcut not usable with StrictUndefined
#710
Using the shortcut version of the ternary operator with no
else
implieselse <undefined>
. This is fine when using the normalUndefined
but makes this shortcut basically useless withStrictUndefined
(and to some extentLoggingUndefined
).I'd change the default from
<undefined>
to''
- like this the behavior of existing templates will not change (empty output) but it would work fine with the stricterUndefined
variants.The only breakage I could imagine is someone using it in a function/macro call with an explicit
is defined
check later on. But I think that's rather unlikely and if necessary a new policy option could be added to make it default to<undefined>
again.The text was updated successfully, but these errors were encountered: