]> source.dussan.org Git - jquery-ui.git/commitdiff
Widget factory: Prevent calling non-existent methods.
authorScott González <scott.gonzalez@gmail.com>
Sun, 7 Sep 2008 20:50:45 +0000 (20:50 +0000)
committerScott González <scott.gonzalez@gmail.com>
Sun, 7 Sep 2008 20:50:45 +0000 (20:50 +0000)
ui/ui.core.js

index 8507bb193717b89660c6e7c37ed1086e4acd8840..9275c5fc179658ea7180c4f9e00eb38d6038d7a3 100644 (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));
                });
        };