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:
Lucas Galfaso
2014-08-18 12:04:31 +01:00
parent 94b5c9f00e
commit 7eae29e5ab

View File

@@ -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);
});
}