ember-awesome-macros icon indicating copy to clipboard operation
ember-awesome-macros copied to clipboard

Error when using raw macro in Ember 3.11

Open erikap opened this issue 5 years ago • 2 comments

When combining computed macros including raw an error is thrown when passing the computed property to a component/helper in a template. Combining other macros than raw works fine.

E.g. supplementsAmount: sum(mapBy('model.supplements', raw('amount')))

causes the error

Error: Assertion Failed: EmberObject.create no longer supports defining computed properties. Define computed properties using extend() or reopen() before calling create().

The issue seems to be related to @bendemboski's review on https://github.com/kellyselden/ember-macro-helpers/pull/260. When using

"ember-macro-helpers": "bendemboski/ember-macro-helpers#fix-ember-3-10"

the error disappears.

erikap avatar Aug 22 '19 16:08 erikap

@bendemboski's branch has been merged.

Has this been resolved?

lolmaus avatar Sep 24 '19 08:09 lolmaus

No, the branch has been merged with a modification that seems to break something. @bendemboski has put a comment about it on the PR kellyselden/ember-macro-helpers/pull/260.

erikap avatar Sep 24 '19 09:09 erikap