mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Widget factory: Make methods chainable if the return value is undefined. Fixed #4601 (Allow undefined return value for chainable method calls).
This commit is contained in:
parent
d8d7cf27c3
commit
58b37be5ac
@ -244,7 +244,7 @@ $.widget = function(name, prototype) {
|
|||||||
methodValue = (instance && $.isFunction(instance[options])
|
methodValue = (instance && $.isFunction(instance[options])
|
||||||
? instance[options].apply(instance, args)
|
? instance[options].apply(instance, args)
|
||||||
: instance);
|
: instance);
|
||||||
if (methodValue !== instance) {
|
if (methodValue !== instance && methodValue !== undefined) {
|
||||||
returnValue = methodValue;
|
returnValue = methodValue;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user