r2754 - Widget factory: Make methods chainable if the return value is undefined. Fixed #4601 (Al...

r2754 - Widget factory: Make methods chainable if the return value is undefined. Fixed #4601 (Al...


Author: scott.gonzalez
Date: Sun Jun 14 19:01:11 2009
New Revision: 2754
Modified:
trunk/ui/ui.core.js
Log:
Widget factory: Make methods chainable if the return value is undefined.
Fixed #4601 (Allow undefined return value for chainable method calls).
Modified: trunk/ui/ui.core.js
==============================================================================
--- trunk/ui/ui.core.js    (original)
+++ trunk/ui/ui.core.js    Sun Jun 14 19:01:11 2009
@@ -244,7 +244,7 @@
                    methodValue = (instance && $.isFunction(instance[options])
                        ? instance[options].apply(instance, args)
                        : instance);
-                if (methodValue !== instance) {
+                if (methodValue !== instance && methodValue !== undefined) {
                    returnValue = methodValue;
                    return false;
                }