aboutsummaryrefslogtreecommitdiffstats
path: root/src/Angular.js
diff options
context:
space:
mode:
authorIgor Minar2013-02-11 22:01:15 -0800
committerIgor Minar2013-02-11 22:01:15 -0800
commitd16975a9de41efae81d3e42f4cda695ada2170e9 (patch)
tree8eac6029f1191ff1506f398180a80d0c72e2c7a4 /src/Angular.js
parent87f6b36bab76ccea9699255f869d90df9f95967a (diff)
downloadangular.js-d16975a9de41efae81d3e42f4cda695ada2170e9.tar.bz2
revert: refactor(angular.copy): use slice(0) to clone arrays
This reverts commit a5b3bcf41cb0e3130439666a78a0ba9feadbd84a. slice(0) doesn't perform deep copy of the array so its unsuitable for our purposes.
Diffstat (limited to 'src/Angular.js')
-rw-r--r--src/Angular.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Angular.js b/src/Angular.js
index 0548f14b..27ef157d 100644
--- a/src/Angular.js
+++ b/src/Angular.js
@@ -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)) {