diff --git a/addon/-private/system/model/internal-model.js b/addon/-private/system/model/internal-model.js index a53a192f756..936a6385402 100644 --- a/addon/-private/system/model/internal-model.js +++ b/addon/-private/system/model/internal-model.js @@ -1,5 +1,6 @@ import { A } from '@ember/array'; import { set, get } from '@ember/object'; +import { assign } from '@ember/polyfills'; import EmberError from '@ember/error'; import { isEqual } from '@ember/utils'; import { setOwner } from '@ember/application'; @@ -632,7 +633,7 @@ export default class InternalModel { changedKeys = this._changedKeys(data.attributes); } - Object.assign(this._data, data.attributes); + assign(this._data, data.attributes); this.pushedData(); if (this.hasRecord) { @@ -805,7 +806,7 @@ export default class InternalModel { let oldData = this._data; let currentData = this._attributes; let inFlightData = this._inFlightAttributes; - let newData = Object.assign({}, inFlightData, currentData); + let newData = assign({}, inFlightData, currentData); let diffData = Object.create(null); let newDataKeys = Object.keys(newData); @@ -1169,9 +1170,9 @@ export default class InternalModel { this.didCleanError(); let changedKeys = this._changedKeys(data); - Object.assign(this._data, this._inFlightAttributes); + assign(this._data, this._inFlightAttributes); if (data) { - Object.assign(this._data, data); + assign(this._data, data); } this._inFlightAttributes = null; @@ -1300,7 +1301,7 @@ export default class InternalModel { } original = Object.create(null); - Object.assign(original, this._data, this._inFlightAttributes); + assign(original, this._data, this._inFlightAttributes); for (i = 0; i < length; i++) { key = keys[i]; diff --git a/addon/-private/system/snapshot.js b/addon/-private/system/snapshot.js index 91288fde88f..369e868a3f1 100644 --- a/addon/-private/system/snapshot.js +++ b/addon/-private/system/snapshot.js @@ -4,6 +4,7 @@ import { inspect } from '@ember/debug'; import EmberError from '@ember/error'; import { get } from '@ember/object'; +import { assign } from '@ember/polyfills'; /** @class Snapshot @@ -147,7 +148,7 @@ export default class Snapshot { @return {Object} All attributes of the current snapshot */ attributes() { - return Object.assign({}, this._attributes); + return assign({}, this._attributes); } /** diff --git a/addon/-private/system/store.js b/addon/-private/system/store.js index b704d27ded6..f57a811e28c 100644 --- a/addon/-private/system/store.js +++ b/addon/-private/system/store.js @@ -7,6 +7,7 @@ import EmberError from '@ember/error'; import MapWithDefault from './map-with-default'; import { run as emberRun } from '@ember/runloop'; import { set, get, computed } from '@ember/object'; +import { assign } from '@ember/polyfills'; import { default as RSVP, Promise } from 'rsvp'; import Service from '@ember/service'; import { typeOf, isPresent, isNone } from '@ember/utils'; @@ -319,7 +320,7 @@ Store = Service.extend({ return emberRun.join(() => { return this._backburner.join(() => { let normalizedModelName = normalizeModelName(modelName); - let properties = Object.assign({}, inputProperties); + let properties = assign({}, inputProperties); // If the passed properties do not include a primary key, // give the adapter an opportunity to generate one. Typically,