I’m currently working on a permission check handlebars helper, which needs to resolve a few promises in order to decide whether a block of html should be displayed or not. And here’s the problem: Returning a promise will always evaluate to true for the handlebars helper that calls the function, even if the promise resolves to false.
I’ve now spent the better part of today trying to fix this, and I’d now like to ask the Ember community to help me out. Am I doing something incredibly stupid? Am I not seeing the obvious solution?
I have created a jsbin to illustrate the problem.
Any help from you to make this work is greatly appreciated! If you have further questions, don’t hesitate to ask!
P.S. off-topic: Is this the right place to ask for help? Or would you rather put this on Stackoverflow?