-
-
Notifications
You must be signed in to change notification settings - Fork 206
Closed
Description
After updating eslint-plugin-ember
to 8.3.0
, I got a require-computed-property-dependencies
error on similar code to this:
class extends Component {
private fooIndex = -1;
@computed('bar')
public get foo(): any {
this.fooIndex = 5;
return this.bar;
}
}
On the this.fooIndex = 5;
line. This is wrong as that property must not be put in the computed's dependencies as it leads to an assertion failure:
Error: Assertion Failed: You attempted to update <frontend@component:something::ember1529>.fooIndex to "5", but it is being tracked by a tracking context, such as a template, computed property, or observer. In order to make sure the context updates properly, you must invalidate the property when updating it. You can mark the property as `@tracked`, or use `@ember/object#set` to do this.
Metadata
Metadata
Assignees
Labels
No labels