Closed grayt0r closed 1 year ago
Oh I actually got the exact same issue ! This PR might fix your issue (https://github.com/adopted-ember-addons/ember-data-model-fragments/pull/474)
@VincentMolinie looks like it does... thank you 🙌
Released as v6.0.2
Versions:
ember-data-model-fragments
:v6.0.1
ember-data
:3.28.13
When pushing a payload to the store for a model that contains a fragment with a function-style
defaultValue
I receive the following error:The model is defined like this:
The error goes away and everything works when I downgrade to
ember-data-model-fragments
v5.0.0
andember-data
v3.27.1
.I can also fix the error by swapping to a non-function
defaultValue
, i.e.:Is this a known limitation of
v6
? Or a bug?A minimal reproduction can be found here: https://github.com/grayt0r/ember-data-model-fragments-bug (relevant commit).
Thanks!