不要怂,就是干,撸起袖子干!

Commit d8d639ba by Mick Hansen

fix(instance): clone options passed to save, closes #4681

1 parent bfefdae2
Showing with 3 additions and 1 deletions
...@@ -494,7 +494,9 @@ Instance.prototype.save = function(options) { ...@@ -494,7 +494,9 @@ Instance.prototype.save = function(options) {
if (arguments.length > 1) { if (arguments.length > 1) {
throw new Error('The second argument was removed in favor of the options object.'); throw new Error('The second argument was removed in favor of the options object.');
} }
options = _.defaults({}, options, {
options = this.$Model.$optClone(options || {});
options = _.defaults(options, {
hooks: true, hooks: true,
validate: true validate: true
}); });
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!