]> source.dussan.org Git - jquery-ui.git/commitdiff
Fixed #3841 - check for $.isFunction before trigger
authorEduardo Lundgren <eduardolundgren@gmail.com>
Fri, 16 Jan 2009 04:27:38 +0000 (04:27 +0000)
committerEduardo Lundgren <eduardolundgren@gmail.com>
Fri, 16 Jan 2009 04:27:38 +0000 (04:27 +0000)
ui/ui.core.js

index c77e9999901f8b5a46aeec0690a61870fc0158c4..458857d1490a720e63c0e3e24d4e653fac9068a3 100644 (file)
@@ -375,7 +375,7 @@ $.widget.prototype = {
 
                this.element.trigger(event, data);
 
-               return !(callback && callback.call(this.element[0], event, data) === false
+               return !($.isFunction(callback) && callback.call(this.element[0], event, data) === false
                        || event.isDefaultPrevented());
        }
 };