From f500db5d75b1cff6ff2344833079962977f8abb4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Sun, 7 Sep 2008 20:50:45 +0000 Subject: [PATCH] Widget factory: Prevent calling non-existent methods. --- ui/ui.core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/ui.core.js b/ui/ui.core.js index 8507bb193..9275c5fc1 100644 --- a/ui/ui.core.js +++ b/ui/ui.core.js @@ -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)); }); }; -- 2.39.5