diff options
| author | DiPeng | 2011-08-01 22:15:33 -0700 |
|---|---|---|
| committer | DiPeng | 2011-08-02 07:11:47 -0700 |
| commit | 67a3315e1de1ca4ea469fc9443e97080513c909e (patch) | |
| tree | 8dc624c2143d0365f02e3ac0cacc1cd5fb3b3fe2 /src/Angular.js | |
| parent | 8f0dcbab804180828d6859b1340c86cf161209fb (diff) | |
| download | angular.js-67a3315e1de1ca4ea469fc9443e97080513c909e.tar.bz2 | |
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.
Diffstat (limited to 'src/Angular.js')
| -rw-r--r-- | src/Angular.js | 6 |
1 files changed, 3 insertions, 3 deletions
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() { |
