aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Worth <rdworth@gmail.com>2008-06-08 00:55:44 +0000
committerRichard Worth <rdworth@gmail.com>2008-06-08 00:55:44 +0000
commite23a0edb70755441cd65a5af2bac8d20cb1d16f0 (patch)
tree1d69575da675650a422cc7b3afce3434a8299503
parent7539a095f66413cc7359303b8a1ef74ec98332d9 (diff)
downloadjquery-ui-e23a0edb70755441cd65a5af2bac8d20cb1d16f0.tar.gz
jquery-ui-e23a0edb70755441cd65a5af2bac8d20cb1d16f0.zip
core widget - fail gracefully if unknown method name supplied
-rw-r--r--ui/ui.core.js2
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));