Skip to content

Commit

Permalink
fix with Object.assign
Browse files Browse the repository at this point in the history
  • Loading branch information
snewcomer committed Nov 5, 2021
1 parent c5b95d2 commit acb3cf6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/store/addon/-private/system/ds-model-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Store extends CoreStore {
_internalModel: internalModel,
container: null,
};
createOptions = { ...createOptions, ...createRecordArgs };
Object.assign(createOptions, createRecordArgs);

// ensure that `getOwner(this)` works inside a model instance
setOwner(createOptions, getOwner(this));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ export default class InternalModel {
}

let additionalCreateOptions = this._recordData._initRecordCreateOptions(properties);
createOptions = { ...createOptions, ...additionalCreateOptions };
Object.assign(createOptions, additionalCreateOptions);

// ensure that `getOwner(this)` works inside a model instance
setOwner(createOptions, getOwner(store));
Expand Down
2 changes: 1 addition & 1 deletion packages/store/addon/-private/system/store/finders.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ function fixRelationshipData(relationshipData, relationshipKind, { id, modelName
}
} else {
payload = relationshipData || {};
payload = { ...payload, ...parentRelationshipData };
Object.assign(payload, parentRelationshipData);
}

return payload;
Expand Down

0 comments on commit acb3cf6

Please sign in to comment.