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

Commit 082dcaba by Robert Kieffer Committed by Felix Becker

Clone defaultScope so it doesn't get overwritten in Model#init (#7040)

1 parent 547897da
Showing with 1 additions and 1 deletions
...@@ -604,7 +604,7 @@ Sequelize.prototype.define = function(modelName, attributes, options) { // testh ...@@ -604,7 +604,7 @@ Sequelize.prototype.define = function(modelName, attributes, options) { // testh
var globalOptions = this.options; var globalOptions = this.options;
if (globalOptions.define) { if (globalOptions.define) {
options = Utils.merge(globalOptions.define, options); options = Utils.merge(_.cloneDeep(globalOptions.define), options);
} }
options = Utils.merge({ options = Utils.merge({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!