Data: use `assign` instead of `merge` here ?

Created on 15 Jan 2019  路  4Comments  路  Source: emberjs/data

I might be wrong, but shouldn't we use Ember.assign instead of Ember.merge here to avoid a 3.6 deprecation warning ?

https://github.com/emberjs/data/blob/4c539f466a21e91499ff18ba0318827db1f27252/addon/-private/system/store/finders.js#L11

Has PR release-needed

Most helpful comment

Deprecation warnings are also caused by (in 3.7)
data/addon/-private/system/model/errors.js

errorsFor(attribute) {
    let map = get(this, 'errorsByAttributeName');

    if (!map.has(attribute)) {
      map.set(attribute, new A());
    }

    return map.get(attribute);
  },

https://deprecations-app-prod.herokuapp.com/deprecations/v3.x/#toc_array-new-array-wrapper

All 4 comments

Deprecation warnings are also caused by (in 3.7)
data/addon/-private/system/model/errors.js

errorsFor(attribute) {
    let map = get(this, 'errorsByAttributeName');

    if (!map.has(attribute)) {
      map.set(attribute, new A());
    }

    return map.get(attribute);
  },

https://deprecations-app-prod.herokuapp.com/deprecations/v3.x/#toc_array-new-array-wrapper

Yep, I think both things should be easy to fix and we'd love PR's for them 馃樃

Looks like https://github.com/emberjs/data/pull/5812 is already open for fixing the Ember.merge deprecation.

This was fixed by #5812, thx @BryanCrotaz

Was this page helpful?
0 / 5 - 0 ratings