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

Commit e3003d5

Browse files
petebacondarwinvojtajina
authored andcommittedMay 29, 2014
style(ngRepeat): jshint was complaining about var names
1 parent b87e5fc commit e3003d5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed
 

‎src/ng/directive/ngRepeat.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,9 @@ var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {
291291
trackByIdFn = trackByIdExpFn || trackByIdObjFn;
292292
// if object, extract keys, sort them and use to determine order of iteration over obj props
293293
collectionKeys = [];
294-
for (key in collection) {
295-
if (collection.hasOwnProperty(key) && key.charAt(0) != '$') {
296-
collectionKeys.push(key);
294+
for (var itemKey in collection) {
295+
if (collection.hasOwnProperty(itemKey) && itemKey.charAt(0) != '$') {
296+
collectionKeys.push(itemKey);
297297
}
298298
}
299299
collectionKeys.sort();
@@ -329,10 +329,10 @@ var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {
329329
}
330330

331331
// remove existing items
332-
for (key in lastBlockMap) {
332+
for (var blockKey in lastBlockMap) {
333333
// lastBlockMap is our own object so we don't need to use special hasOwnPropertyFn
334-
if (lastBlockMap.hasOwnProperty(key)) {
335-
block = lastBlockMap[key];
334+
if (lastBlockMap.hasOwnProperty(blockKey)) {
335+
block = lastBlockMap[blockKey];
336336
elementsToRemove = getBlockElements(block.clone);
337337
$animate.leave(elementsToRemove);
338338
forEach(elementsToRemove, function(element) { element[NG_REMOVED] = true; });

0 commit comments

Comments
 (0)