From 58b37be5acf86913900b51d92eaa3cbb38b14f91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Mon, 15 Jun 2009 02:01:11 +0000 Subject: [PATCH] Widget factory: Make methods chainable if the return value is undefined. Fixed #4601 (Allow undefined return value for chainable method calls). --- 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 fe2d228e3..eb0420c62 100644 --- a/ui/ui.core.js +++ b/ui/ui.core.js @@ -244,7 +244,7 @@ $.widget = function(name, prototype) { methodValue = (instance && $.isFunction(instance[options]) ? instance[options].apply(instance, args) : instance); - if (methodValue !== instance) { + if (methodValue !== instance && methodValue !== undefined) { returnValue = methodValue; return false; }