From 9e57ce0c7af742d15223b9d2aa1f9aed5792d007 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Mon, 11 Feb 2013 21:58:00 -0800 Subject: revert: refactor(angular.copy): use slice(0) to clone arrays This reverts commit 28273b7f1ef52e46d5bc23c41bc7a1492cf23014o. slice(0) doesn't perform deep copy of the array so its unsuitable for our purposes. --- src/Angular.js | 3 +-- 1 file changed, 1 insertion(+), 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)) { -- cgit v1.2.3