Closed svenpl closed 5 years ago
@svenpl Thank you for the PR. I'll review asap and release a new version.
@svenpl I updated the ember-cli version. Can you rebase master and see if that fixes the tests?
@fsmanuel Yes, I will do that.
@svenpl thanks. I looked into the error and found out that the factoryFor().create() in ember 2.12.x sets __OWNER__
and __NAME_KEY__
which results in a premature save that overwrites the already stored data.
Could you update saveIfChanged
in addon/helpers/utils.js
:
// addon/helpers/utils.js
function saveIfChanged(key) {
this._super.apply(this, arguments);
// TODO: v2.0 - Remove workaround and drop support for 2.12.x
// Ember 2.12.x sets __OWNER__ and __NAME_KEY__ on factoryFor().create()
// which results in a premature save hat overwrites the already stored data.
if (/^__OWNER|NAME_KEY__/.test(key)) {
return;
}
if (key !== '_isInitialContent') {
this._save();
}
}
@svenpl released as v1.7.1
. Thanks a lot!
This fixes an issue similar to #268, but with Ember 3.x.