Widget factory: Prevent calling non-existent methods.

This commit is contained in:
Scott González 2008-09-07 20:50:45 +00:00
parent 41811fb8c3
commit f500db5d75

View File

@ -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));
});
};