Skip to content

Commit

Permalink
support IE11
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired committed Apr 16, 2018
1 parent 2bff6c8 commit 51ad4f5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
11 changes: 6 additions & 5 deletions addon/-private/system/model/internal-model.js
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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];
Expand Down
3 changes: 2 additions & 1 deletion addon/-private/system/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
}

/**
Expand Down
3 changes: 2 additions & 1 deletion addon/-private/system/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 51ad4f5

Please sign in to comment.