Skip to content

Commit c460dff

Browse files
committed
fix(ngRepeat): fix reference to last collection value remaining across linkages
Ref angular#16776
1 parent 24ce03b commit c460dff

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)