Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4870

Is conditional `fn` helper possible in Ember 3.24?

$
0
0

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

Read full topic


Viewing all articles
Browse latest Browse all 4870

Trending Articles