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

Commit cf919a6

Browse files
jbedardmgol
authored andcommitted
fix(ngRepeat): fix reference to last collection value remaining across linkages
Ref #16776
1 parent d4d1031 commit cf919a6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/ng/directive/ngRepeat.js

+6
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,12 @@ var ngRepeatDirective = ['$parse', '$animate', '$compile', function($parse, $ani
592592
}
593593
}
594594

595+
// Clear the value property from the hashFnLocals object to prevent a reference to the last value
596+
// being leaked into the ngRepeatCompile function scope
597+
if (hashFnLocals) {
598+
hashFnLocals[valueIdentifier] = undefined;
599+
}
600+
595601
// remove leftover items
596602
for (var blockKey in lastBlockMap) {
597603
block = lastBlockMap[blockKey];

0 commit comments

Comments
 (0)