From: Scott González Date: Sun, 7 Sep 2008 20:50:45 +0000 (+0000) Subject: Widget factory: Prevent calling non-existent methods. X-Git-Tag: 1.6rc2~35 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f500db5d75b1cff6ff2344833079962977f8abb4;p=jquery-ui.git Widget factory: Prevent calling non-existent methods. --- diff --git a/ui/ui.core.js b/ui/ui.core.js index 8507bb193..9275c5fc1 100644 --- a/ui/ui.core.js +++ b/ui/ui.core.js @@ -136,7 +136,7 @@ $.widget = function(name, prototype) { $.data(this, name, new $[namespace][name](this, options))); // method call - (instance && isMethodCall && + (instance && isMethodCall && $.isFunction(instance[options]) && instance[options].apply(instance, args)); }); };