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

Commit d5b42034 by Mick Hansen

Merge pull request #4531 from Verdier/master

Revert scopeInclude clone. Better fixed by #4518
2 parents 9063a7ef 1d99a072
Showing with 1 additions and 4 deletions
...@@ -2542,7 +2542,7 @@ Model.prototype.$getDefaultTimestamp = function(attr) { ...@@ -2542,7 +2542,7 @@ Model.prototype.$getDefaultTimestamp = function(attr) {
// Inject current scope into options. Includes should have been conformed (conformOptions) before calling this // Inject current scope into options. Includes should have been conformed (conformOptions) before calling this
Model.$injectScope = function (scope, options) { Model.$injectScope = function (scope, options) {
scope = optClone(scope); scope = optClone(scope);
var filteredScope = _.omit(scope, 'include'); // Includes need special treatment var filteredScope = _.omit(scope, 'include'); // Includes need special treatment
_.defaults(options, filteredScope); _.defaults(options, filteredScope);
...@@ -2562,9 +2562,6 @@ Model.$injectScope = function (scope, options) { ...@@ -2562,9 +2562,6 @@ Model.$injectScope = function (scope, options) {
} }
return sameModel; return sameModel;
})) { })) {
// Do not inject Model.$scope.include directly,
// make a shallow copy (#4470).
scopeInclude = _.clone(scopeInclude);
options.include.push(scopeInclude); options.include.push(scopeInclude);
} }
}); });
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!