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

Commit

Permalink
fix(ngRepeat): fix reference to last collection value remaining acros…
Browse files Browse the repository at this point in the history
…s linkages

Ref #16776
  • Loading branch information
jbedard authored and mgol committed Dec 6, 2018
1 parent d4d1031 commit cf919a6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ng/directive/ngRepeat.js
Expand Up @@ -592,6 +592,12 @@ var ngRepeatDirective = ['$parse', '$animate', '$compile', function($parse, $ani
}
}

// Clear the value property from the hashFnLocals object to prevent a reference to the last value
// being leaked into the ngRepeatCompile function scope
if (hashFnLocals) {
hashFnLocals[valueIdentifier] = undefined;
}

// remove leftover items
for (var blockKey in lastBlockMap) {
block = lastBlockMap[blockKey];
Expand Down

0 comments on commit cf919a6

Please sign in to comment.