This keeps tripping me up!
I use liquid templates a lot. In a
capture block, the result of any operation will always be a string.
Then, if you check for truthy-ness of the captured variable down the line, you’ve got to compare it with a specific string:
capturedVariable == "true"