mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-09 09:00:34 +08:00
perf($rootScope): do not use Function::call when not needed
When a `$watchGroup` delegates the call to a `$watch`, there is no need to keep the context of `this`
This commit is contained in:
@@ -407,7 +407,7 @@ function $RootScopeProvider(){
|
||||
return this.$watch(watchExpressions[0], function watchGroupAction(value, oldValue, scope) {
|
||||
newValues[0] = value;
|
||||
oldValues[0] = oldValue;
|
||||
listener.call(this, newValues, (value === oldValue) ? newValues : oldValues, scope);
|
||||
listener(newValues, (value === oldValue) ? newValues : oldValues, scope);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user