Skip to content

Commit ec6d106

Browse files
committed
code cleanup: missing ; and indentation
1 parent fab4ada commit ec6d106

2 files changed

Lines changed: 15 additions & 7 deletions

File tree

src/Angular.js

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -751,13 +751,21 @@ function concat(array1, array2, index) {
751751
* @returns {function()} Function that wraps the `fn` with all the specified bindings.
752752
*/
753753
function bind(self, fn) {
754-
var curryArgs = arguments.length > 2 ? slice.call(arguments, 2, arguments.length) : [];
754+
var curryArgs = arguments.length > 2
755+
? slice.call(arguments, 2, arguments.length)
756+
: [];
755757
if (typeof fn == $function && !(fn instanceof RegExp)) {
756-
return curryArgs.length ? function() {
757-
return arguments.length ? fn.apply(self, curryArgs.concat(slice.call(arguments, 0, arguments.length))) : fn.apply(self, curryArgs);
758-
}: function() {
759-
return arguments.length ? fn.apply(self, arguments) : fn.call(self);
760-
};
758+
return curryArgs.length
759+
? function() {
760+
return arguments.length
761+
? fn.apply(self, curryArgs.concat(slice.call(arguments, 0, arguments.length)))
762+
: fn.apply(self, curryArgs);
763+
}
764+
: function() {
765+
return arguments.length
766+
? fn.apply(self, arguments)
767+
: fn.call(self);
768+
};
761769
} else {
762770
// in IE, native methods are not functions and so they can not be bound (but they don't need to be)
763771
return fn;

test/mocks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ function $exceptionHandlerMockFactory() {
6464
mockHandler.errors = [];
6565

6666
return mockHandler;
67-
}
67+
}

0 commit comments

Comments
 (0)