Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 7eae29e

Browse files
committed
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`
1 parent 94b5c9f commit 7eae29e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ng/rootScope.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ function $RootScopeProvider(){
407407
return this.$watch(watchExpressions[0], function watchGroupAction(value, oldValue, scope) {
408408
newValues[0] = value;
409409
oldValues[0] = oldValue;
410-
listener.call(this, newValues, (value === oldValue) ? newValues : oldValues, scope);
410+
listener(newValues, (value === oldValue) ? newValues : oldValues, scope);
411411
});
412412
}
413413

0 commit comments

Comments
 (0)