mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
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.
This commit is contained in:
parent
8f0dcbab80
commit
67a3315e1d
2 changed files with 4 additions and 4 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -744,7 +744,7 @@ function getterFn(path) {
|
|||
' t = angular.Global.typeOf(l);\n' +
|
||||
' fn = (angular[t.charAt(0).toUpperCase() + t.substring(1)]||{})["' + name + '"];\n' +
|
||||
' if (fn) s = function(){ return fn.apply(l, ' +
|
||||
'[l].concat(Array.prototype.slice.call(arguments, 0, arguments.length))); };\n' +
|
||||
'[l].concat(Array.prototype.slice.call(arguments, 0))); };\n' +
|
||||
'}\n';
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue