Commit from 4 days ago


(Arran Scott) #1

There was a commit made 4 days ago that’s seemed to introduce some unexpected functionality.

This added line makes the following if statement in user.hbs always evaluate to true:
{{if model.profileBackground 'has-background' 'no-background'}}

Here model.profileBackground is always truthy and thus always results in the has-background class being applied to the element.

I’ve just tested this on the live meta.discourse.org and it still seems to be happening. Is there something I’m missing here or is it a genuine bug?


(Robin Ward) #2

Thanks for reporting it. It seems empty safe strings in ember don’t evaluate as fasley!


(Robin Ward) #3