Fixed #1887 - trigger fails if extra is not a function

This commit is contained in:
Richard Worth 2007-12-18 03:13:39 +00:00
parent 24e036c7c8
commit 76c1889e22

View file

@ -196,7 +196,7 @@ jQuery.event = {
data.shift();
// Handle triggering of extra function
if ( extra ) {
if ( extra && jQuery.isFunction( extra ) ) {
// call the extra function and tack the current return value on the end for possible inspection
var ret = extra.apply( elem, data.concat( val ) );
// if anything is returned, give it precedence and have it overwrite the previous value