Skip to content

Commit

Permalink
fix(document): don't apply transforms to nested docs when updating al…
Browse files Browse the repository at this point in the history
…ready saved doc

Fix #5807
  • Loading branch information
vkarpov15 committed Nov 15, 2017
1 parent dce067b commit 20fc0ab
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,13 @@ Model.prototype.$__delta = function() {
value = value.toObject();
operand(this, where, delta, data, value);
} else {
value = utils.clone(value, {depopulate: 1, _isNested: true});
value = utils.clone(value, {
depopulate: true,
transform: false,
virtuals: false,
retainKeyOrder: true,
_isNested: true
});
operand(this, where, delta, data, value);
}
}
Expand Down

0 comments on commit 20fc0ab

Please sign in to comment.