Skip to content
Permalink
Browse files

core widget - fail gracefully if unknown method name supplied

  • Loading branch information
rdworth committed Jun 8, 2008
1 parent 7539a09 commit e23a0edb70755441cd65a5af2bac8d20cb1d16f0
Showing with 1 addition and 1 deletion.
  1. +1 −1 ui/ui.core.js
@@ -101,7 +101,7 @@ $.widget = function(name, prototype) {

return this.each(function() {
var instance = $.data(this, name);
if (isMethodCall && instance) {
if (isMethodCall && instance && $.isFunction(instance[options])) {
instance[options].apply(instance, args);
} else if (!isMethodCall) {
$.data(this, name, new $[namespace][name](this, options));

0 comments on commit e23a0ed

Please sign in to comment.
You can’t perform that action at this time.