mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-28 21:05:43 +08:00
code cleanup: missing ; and indentation
This commit is contained in:
@@ -751,13 +751,21 @@ function concat(array1, array2, index) {
|
|||||||
* @returns {function()} Function that wraps the `fn` with all the specified bindings.
|
* @returns {function()} Function that wraps the `fn` with all the specified bindings.
|
||||||
*/
|
*/
|
||||||
function bind(self, fn) {
|
function bind(self, fn) {
|
||||||
var curryArgs = arguments.length > 2 ? slice.call(arguments, 2, arguments.length) : [];
|
var curryArgs = arguments.length > 2
|
||||||
|
? slice.call(arguments, 2, arguments.length)
|
||||||
|
: [];
|
||||||
if (typeof fn == $function && !(fn instanceof RegExp)) {
|
if (typeof fn == $function && !(fn instanceof RegExp)) {
|
||||||
return curryArgs.length ? function() {
|
return curryArgs.length
|
||||||
return arguments.length ? fn.apply(self, curryArgs.concat(slice.call(arguments, 0, arguments.length))) : fn.apply(self, curryArgs);
|
? function() {
|
||||||
}: function() {
|
return arguments.length
|
||||||
return arguments.length ? fn.apply(self, arguments) : fn.call(self);
|
? fn.apply(self, curryArgs.concat(slice.call(arguments, 0, arguments.length)))
|
||||||
};
|
: fn.apply(self, curryArgs);
|
||||||
|
}
|
||||||
|
: function() {
|
||||||
|
return arguments.length
|
||||||
|
? fn.apply(self, arguments)
|
||||||
|
: fn.call(self);
|
||||||
|
};
|
||||||
} else {
|
} else {
|
||||||
// in IE, native methods are not functions and so they can not be bound (but they don't need to be)
|
// in IE, native methods are not functions and so they can not be bound (but they don't need to be)
|
||||||
return fn;
|
return fn;
|
||||||
|
|||||||
@@ -64,4 +64,4 @@ function $exceptionHandlerMockFactory() {
|
|||||||
mockHandler.errors = [];
|
mockHandler.errors = [];
|
||||||
|
|
||||||
return mockHandler;
|
return mockHandler;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user