From 67a3315e1de1ca4ea469fc9443e97080513c909e Mon Sep 17 00:00:00 2001 From: DiPeng Date: Mon, 1 Aug 2011 22:15:33 -0700 Subject: refactor(angular): remove unnecessary parameter for slice function - the end index for slice, if not specified, is default to the end of the array it operates on. --- src/Angular.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Angular.js') diff --git a/src/Angular.js b/src/Angular.js index 63182ecd..f876dde0 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -793,11 +793,11 @@ function elementError(element, type, error) { } function concat(array1, array2, index) { - return array1.concat(slice.call(array2, index, array2.length)); + return array1.concat(slice.call(array2, index)); } function sliceArgs(args, startIndex) { - return slice.call(args, startIndex || 0, args.length); + return slice.call(args, startIndex || 0); } @@ -823,7 +823,7 @@ function bind(self, fn) { return curryArgs.length ? function() { return arguments.length - ? fn.apply(self, curryArgs.concat(slice.call(arguments, 0, arguments.length))) + ? fn.apply(self, curryArgs.concat(slice.call(arguments, 0))) : fn.apply(self, curryArgs); } : function() { -- cgit v1.2.3