diff options
author | Richard Worth <rdworth@gmail.com> | 2008-06-08 00:55:44 +0000 |
---|---|---|
committer | Richard Worth <rdworth@gmail.com> | 2008-06-08 00:55:44 +0000 |
commit | e23a0edb70755441cd65a5af2bac8d20cb1d16f0 (patch) | |
tree | 1d69575da675650a422cc7b3afce3434a8299503 | |
parent | 7539a095f66413cc7359303b8a1ef74ec98332d9 (diff) | |
download | jquery-ui-e23a0edb70755441cd65a5af2bac8d20cb1d16f0.tar.gz jquery-ui-e23a0edb70755441cd65a5af2bac8d20cb1d16f0.zip |
core widget - fail gracefully if unknown method name supplied
-rw-r--r-- | ui/ui.core.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/ui.core.js b/ui/ui.core.js index 7b96ced5a..d033a8cc0 100644 --- a/ui/ui.core.js +++ b/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)); |