Fix #12423. Ensure we can .apply() before we try.

I can't think of an uncontrived way to unit test this, it only occurs in IE when a BHO monkeys with the links.
This commit is contained in:
Dave Methvin 2012-09-18 14:26:21 -04:00
parent 1474c067f2
commit e8e3e90a86

View File

@ -317,7 +317,7 @@ jQuery.event = {
}
// Note that this is a bare JS function and not a jQuery handler
handle = ontype && cur[ ontype ];
if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) {
if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {
event.preventDefault();
}
}