pebble icon indicating copy to clipboard operation
pebble copied to clipboard

Boolean operator with objects

Open tobiascapin opened this issue 1 year ago • 0 comments

Hello, I'm migrating my templates from another java library derived from Twig syntax. I have some troubles with implicit boolean expressions, I cannot understand very well why this expression works:

{% if myobj %}

and why this doesn't work

{% if not myobj %}

I know it can be replaced by {% if myobj is empty %} but since the first works, make it sense to not use the "not"?

tobiascapin avatar Dec 26 '23 13:12 tobiascapin