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

Commit 7a1bdbc

Browse files
committed
fix($rootScope): do not mark $watchCollectionInterceptor as $stateful
This interceptor does not store any state, it only reads the (complex) state of its input. Removing the `$stateful` flag will allow some expressions (those with `inputs` such as object/array literals) to avoid invoking the `$watchCollectionInterceptor` and avoid creating the literals on each digest.
1 parent 3bce707 commit 7a1bdbc

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/ng/rootScope.js

-2
Original file line numberDiff line numberDiff line change
@@ -581,8 +581,6 @@ function $RootScopeProvider() {
581581
* de-registration function is executed, the internal watch operation is terminated.
582582
*/
583583
$watchCollection: function(obj, listener) {
584-
$watchCollectionInterceptor.$stateful = true;
585-
586584
var self = this;
587585
// the current value, updated on each dirty-check run
588586
var newValue;

0 commit comments

Comments
 (0)