Commit 6bc9fc7c authored by Gianni Chiappetta's avatar Gianni Chiappetta

Perf. improvement based on fearphage's suggestion (direct vs call vs apply).

parent 1ebb5ab3
......@@ -754,7 +754,11 @@ jQuery.extend({
if ( jQuery.support.nativeBind ) {
// Native bind
args = slice.call( arguments, 1 );
proxy = Function.prototype.bind.apply( fn, args );
if ( args.length ) {
proxy = Function.prototype.bind.apply( fn, args );
} else {
proxy = fn.bind( context );
}
} else {
// Simulated bind
args = slice.call( arguments, 2 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment