aboutsummaryrefslogtreecommitdiffstats
path: root/src/apis.js
diff options
context:
space:
mode:
authorMisko Hevery2010-05-30 20:21:40 -0700
committerMisko Hevery2010-05-30 20:21:40 -0700
commit81dac70e72430b7ab9a824ab923038c1e00e7003 (patch)
tree17efcdc2df48d32a0a928cc2ab755f355e9f6ae1 /src/apis.js
parent2e33e89a77d115ff17f5841ec328b1c1e4228161 (diff)
downloadangular.js-81dac70e72430b7ab9a824ab923038c1e00e7003.tar.bz2
imrove $orderBy performance
Diffstat (limited to 'src/apis.js')
-rw-r--r--src/apis.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/apis.js b/src/apis.js
index 0038a6e1..306d0ce8 100644
--- a/src/apis.js
+++ b/src/apis.js
@@ -190,7 +190,9 @@ var angularArray = {
}
return 0;
};
- return copy(array).sort(reverse(comparator, descend));
+ var arrayCopy = [];
+ for ( var i = 0; i < array.length; i++) { arrayCopy.push(array[i]); }
+ return arrayCopy.sort(reverse(comparator, descend));
},
'orderByToggle':function(predicate, attribute) {
var STRIP = /^([+|-])?(.*)/;