diff --git a/files/en-us/learn/tools_and_testing/client-side_javascript_frameworks/ember_interactivity_events_state/index.md b/files/en-us/learn/tools_and_testing/client-side_javascript_frameworks/ember_interactivity_events_state/index.md index db17bbb027bafec..1d667bff2dc9bf1 100644 --- a/files/en-us/learn/tools_and_testing/client-side_javascript_frameworks/ember_interactivity_events_state/index.md +++ b/files/en-us/learn/tools_and_testing/client-side_javascript_frameworks/ember_interactivity_events_state/index.md @@ -214,6 +214,8 @@ This is because Ember extends JavaScript's Array prototype by default, giving us There are dozens of these methods, including `pushObjects()`, `insertAt()`, or `popObject()`, which can be used with any type (not just Objects). Ember's [ArrayProxy](https://api.emberjs.com/ember/4.2/classes/ArrayProxy) also gives us more handy methods, like `isAny()`, `findBy()`, and `filterBy()` to make life easier. +**Note:** If you receive a console error around the `pushObject()` function (e.g. `this.todos.pushObject is not a function`) you may need to explicitly typecast your JavaScript Array into an Ember Array using the `A()` method. Add `import { A } from '@ember/array';` at the top of the `todo-data.js` file, and replace `@tracked todos = []` with `@tracked todos = A()`. + ## Using the service from our header component Now that we've defined a way to add todos, we can interact with this service from the `header.js` input component to actually start adding them.