I usually did this approach to handle with actions that are optionals:
<MyComponent class=“my_component_class” @onChange={{if @changeHandler (fn @changeHandler this.param)}} />
This worked fine until Ember 3.20, starting in Ember 3.24 I got a Assertion Failed: You must pass a function as the fn helpers first argument, you passed undefined
I fixed it using an if block with the component without the @onChange parameter in else. This is a bug?
3 posts - 2 participants