twig.js
twig.js copied to clipboard
Issue when using ternary operator to output content
Hi. I encountered this weird issue that I don't seem to find anywhere being mentioned.
{% set test2 = 'text 2' %} {{ dump(test1) }} {{ test1 ? test1 : test2 }}
This does not render any text. If test1 was set, it would output test1, as expected.
This does output text 2:
{{ test1 ?: test2 }}
Tried this on 1.17.1 as well. PHP twig renders as expected.