This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1262,14 +1262,15 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
1262
1262
1263
1263
1264
1264
1265
- var onChangesTtl ;
1265
+ var onChangesTtl = TTL ;
1266
1266
// The onChanges hooks should all be run together in a single digest
1267
1267
// When changes occur, the call to trigger their hooks will be added to this queue
1268
1268
var onChangesQueue ;
1269
1269
1270
1270
// This function is called in a $$postDigest to trigger all the onChanges hooks in a single digest
1271
1271
function flushOnChangesQueue ( ) {
1272
1272
if ( ! ( onChangesTtl -- ) ) {
1273
+ onChangesTtl = TTL ;
1273
1274
throw $compileMinErr ( 'infchng' , '{0} $onChanges() iterations reached. Aborting!\n' , TTL ) ;
1274
1275
}
1275
1276
// We must run this hook in an apply since the $$postDigest runs outside apply
@@ -3194,7 +3195,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
3194
3195
// If we have not already scheduled the top level onChangesQueue handler then do so now
3195
3196
if ( ! onChangesQueue ) {
3196
3197
// Initialize the TTL tracker for tracking stack overflow
3197
- if ( isUndefined ( onChangesTtl ) ) { onChangesTtl = TTL ; }
3198
3198
scope . $$postDigest ( flushOnChangesQueue ) ;
3199
3199
onChangesQueue = [ ] ;
3200
3200
}
You can’t perform that action at this time.
0 commit comments