diff options
| author | Igor Minar | 2012-11-23 22:43:30 +0100 |
|---|---|---|
| committer | Igor Minar | 2012-11-26 20:36:53 +0100 |
| commit | 1b17dfa693c36607ea86c7129a8612f7771c2f22 (patch) | |
| tree | 7889c3c35598a93ca715c1c3d8dc22ee129bece9 /src/ng/directive/ngRepeat.js | |
| parent | e6d9bea4f3b2eb28851298d3dc3a30d46062d58a (diff) | |
| download | angular.js-1b17dfa693c36607ea86c7129a8612f7771c2f22.tar.bz2 | |
fix(ngRepeat): support mostly-stable repeating for primitives
I'm reverting changes that were originally done to ngRepeat to fix #933,
because these are now not necessary after the previous changes to keep
ngModel always synced with the DOM.
Diffstat (limited to 'src/ng/directive/ngRepeat.js')
| -rw-r--r-- | src/ng/directive/ngRepeat.js | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/ng/directive/ngRepeat.js b/src/ng/directive/ngRepeat.js index 8c934b76..893ad442 100644 --- a/src/ng/directive/ngRepeat.js +++ b/src/ng/directive/ngRepeat.js @@ -119,14 +119,7 @@ var ngRepeatDirective = ngDirective({ key = (collection === array) ? index : array[index]; value = collection[key]; - // if value is object, it can be shifted to allow for position change - // if is not object, need to first check whether index is same to avoid shifting wrong val - last = isObject(value) - ? lastOrder.shift(value) - : (last = lastOrder.peek(value)) && (index === last.index) - ? lastOrder.shift(value) - : undefined; - + last = lastOrder.shift(value); if (last) { // if we have already seen this object, then we need to reuse the |
