revert: refactor(angular.copy): use slice(0) to clone arrays

This reverts commit a5b3bcf41c.

slice(0) doesn't perform deep copy of the array so its unsuitable
for our purposes.
This commit is contained in:
Igor Minar 2013-02-11 22:01:15 -08:00
parent 87f6b36bab
commit d16975a9de

View file

@ -556,8 +556,7 @@ function copy(source, destination){
destination = source;
if (source) {
if (isArray(source)) {
// http://jsperf.com/copy-array-with-slice-vs-for
destination = source.slice(0);
destination = copy(source, []);
} else if (isDate(source)) {
destination = new Date(source.getTime());
} else if (isObject(source)) {