Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2992b40

Browse files
committed
code cleanup: missing ; and indentation
1 parent b2fd083 commit 2992b40

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

src/Angular.js

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