emberjs/ember.js — pull request #9916 by oneeman (2014-12-14 17:52:58+00:00)
Title: [BUGFIX beta] bound if/unless inside unbound if/unless (#9894)

Addsa previously failing test and simple fix for https://github.com/emberjs/ember.js/issues/9894. The problem was that `isUnbound` was not being unset until after the inner templates were rendered, so it was interpreting the inner if/unless as unbound too. I made the same changes in both the handlebars and htmlbars packages, but the tests seems to only be for htmlbars. Let me know if this isn't the right way to do it.

Also, I considered doing something more fancy/elegant, in order to avoid needing to delete `isUnbound` everywhere it's used that could cause problems. (And, note that it has other usages than if/unless, but I believe those are ok). Something like setting it to a function which returns true the first time and false afterwards, or something like that.

I'd be happy to do it if it seems like added complexity is justified by its allowing us to keep the logic in one place (in the unbound helper rather than needing to set it there and unset it in the if/unless helpers, as currently), so just let me know what you think.