Ember "Action passed is null or undefined in (action)" error

Viewed 2954

I have an Ember component checkout-form that contains some logic for handling a checkout process. Here’s a simplified version of how I’m using it:

{{#checkout-form}}

  {{#each model.courses.otherDates as |date|}}
    {{course-date model=date selectDate=(action selectDate) }}
  {{/each}}

{{/checkout-form}}

Inside of my checkout-form.js component I have the following action:

selectDate(day) {
  this.set("startAt", day.get("serverString"))
}

And finally inside of my course-date.js component I have:

click () {
  const courseStart = this.get('courseStart')
  this.get('selectDate')(courseStart)
}

However, when running this code I get the error:

ember.debug.js:19818 Assertion Failed: Action passed is null or undefined in (action) from <site@controller:checkout/date::ember389>.

What am I missing here? I am passing the action into the course-date component and not sure why is it asking for a controller?

1 Answers
Related