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

Commit dd95c37

Browse files
committed
fix(ngRepeat): fix reference to last collection value remaining across linkages
1 parent 77ebb71 commit dd95c37

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/ng/directive/ngRepeat.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,12 @@ var ngRepeatDirective = ['$parse', '$animate', '$compile', function($parse, $ani
650650
}
651651
}
652652
lastBlockMap = nextBlockMap;
653+
654+
// Clear the value property from the hashFnLocals object to prevent a reference to the last value
655+
// being leaked into this ngRepeatCompile function scope
656+
if (hashFnLocals) {
657+
hashFnLocals[valueIdentifier] = undefined;
658+
}
653659
});
654660
};
655661
}

0 commit comments

Comments
 (0)