Skip to content

Commit

Permalink
Create previous attributes using deepClone
Browse files Browse the repository at this point in the history
- This is similar to the change introduced recently for single models, 
but this is for models in relations.
  • Loading branch information
ricardograca committed Nov 22, 2018
1 parent aef8244 commit 54554b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/relation.js
Expand Up @@ -418,7 +418,7 @@ const Relation = RelationBase.extend({
// its parsed attributes
related.map((model) => {
model.attributes = model.parse(model.attributes);
model.formatTimestamps()._previousAttributes = _.clone(model.attributes);
model.formatTimestamps()._previousAttributes = _.cloneDeep(model.attributes);
model._reset();
});

Expand Down

0 comments on commit 54554b7

Please sign in to comment.