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

Commit 5b1e6f6

Browse files
SQUASH ME
1 parent 666fe16 commit 5b1e6f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ng/compile.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,14 +1262,15 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
12621262

12631263

12641264

1265-
var onChangesTtl;
1265+
var onChangesTtl = TTL;
12661266
// The onChanges hooks should all be run together in a single digest
12671267
// When changes occur, the call to trigger their hooks will be added to this queue
12681268
var onChangesQueue;
12691269

12701270
// This function is called in a $$postDigest to trigger all the onChanges hooks in a single digest
12711271
function flushOnChangesQueue() {
12721272
if (!(onChangesTtl--)) {
1273+
onChangesTtl = TTL;
12731274
throw $compileMinErr('infchng', '{0} $onChanges() iterations reached. Aborting!\n', TTL);
12741275
}
12751276
// We must run this hook in an apply since the $$postDigest runs outside apply
@@ -3194,7 +3195,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
31943195
// If we have not already scheduled the top level onChangesQueue handler then do so now
31953196
if (!onChangesQueue) {
31963197
// Initialize the TTL tracker for tracking stack overflow
3197-
if (isUndefined(onChangesTtl)) { onChangesTtl = TTL; }
31983198
scope.$$postDigest(flushOnChangesQueue);
31993199
onChangesQueue = [];
32003200
}

0 commit comments

Comments
 (0)