Commit from 4 days ago

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?

4 Likes

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

https://github.com/discourse/discourse/commit/e9309f2d960007bd5184721ded97f89b93962dc8

5 Likes