ember-custom-actions icon indicating copy to clipboard operation
ember-custom-actions copied to clipboard

Remove computed-property.override deprecation

Open tniezurawski opened this issue 5 years ago • 2 comments

I see this deprecation since Ember 3.9.0:

DEPRECATION: The <(unknown):ember2859>#options computed property was just overriden. This removes the computed property and replaces it with a plain value, and has been deprecated. If you want this behavior, consider defining a setter which does it manually. [deprecation id: computed-property.override] See https://emberjs.com/deprecations/v3.x#toc_computed-property-override for more details.

I believe the code responsible for that is:

https://github.com/Exelord/ember-custom-actions/blob/fa509a8ab6106624b89363d23eb2895eb6793f64/addon/actions/custom.js#L8-L14

Where you override options computed property:

https://github.com/Exelord/ember-custom-actions/blob/fa509a8ab6106624b89363d23eb2895eb6793f64/addon/actions/action.js#L44-L46

Solution: I think you should set options value ({}) in the init hook. It seems like computed prop was used here to avoid state leaking.

tniezurawski avatar Aug 23 '19 13:08 tniezurawski

Yep this is a fix :)

Exelord avatar Aug 23 '19 14:08 Exelord

I think this was fixed in #56, so the issue can be closed now?

zyniq82 avatar Oct 13 '21 12:10 zyniq82