diff options
Diffstat (limited to 'ui/source')
-rw-r--r-- | ui/source/ui.core.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/source/ui.core.js b/ui/source/ui.core.js index aa3c9f464..aff49eeda 100644 --- a/ui/source/ui.core.js +++ b/ui/source/ui.core.js @@ -101,10 +101,10 @@ $.widget = function(name, prototype) { return this.each(function() { var instance = $.data(this, name); - if (!instance) { - $.data(this, name, new $[namespace][name](this, options)); - } else if (isMethodCall) { + if (isMethodCall && instance) { instance[options].apply(instance, args); + } else if (!isMethodCall) { + $.data(this, name, new $[namespace][name](this, options)); } }); }; |