File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ var ngRepeatDirective = ngDirective({
9696 // Same as lastOrder but it has the current state. It will become the
9797 // lastOrder on the next iteration.
9898 nextOrder = new HashQueueMap ( ) ,
99- arrayLength ,
99+ arrayBound ,
100100 childScope ,
101101 key , value , // key/value of iteration
102102 array ,
@@ -117,7 +117,7 @@ var ngRepeatDirective = ngDirective({
117117 array = collection || [ ] ;
118118 }
119119
120- arrayLength = array . length ;
120+ arrayBound = array . length - 1 ;
121121
122122 // we are not using forEach for perf reasons (trying to avoid #call)
123123 for ( index = 0 , length = array . length ; index < length ; index ++ ) {
@@ -154,7 +154,7 @@ var ngRepeatDirective = ngDirective({
154154 childScope . $index = index ;
155155
156156 childScope . $first = ( index === 0 ) ;
157- childScope . $last = ( index === ( arrayLength - 1 ) ) ;
157+ childScope . $last = ( index === arrayBound ) ;
158158 childScope . $middle = ! ( childScope . $first || childScope . $last ) ;
159159
160160 if ( ! last ) {
You can’t perform that action at this time.
0 commit comments