Fixes #9104. Returning null or undefined in a pipe callback shouldn't end up throwing an exception. Silly, silly, me.
This commit is contained in:
parent
efd0fce7a1
commit
8c13cfa805
2 changed files with 11 additions and 3 deletions
|
@ -119,7 +119,7 @@ jQuery.extend({
|
|||
if ( jQuery.isFunction( fn ) ) {
|
||||
deferred[ handler ](function() {
|
||||
returned = fn.apply( this, arguments );
|
||||
if ( jQuery.isFunction( returned.promise ) ) {
|
||||
if ( returned && jQuery.isFunction( returned.promise ) ) {
|
||||
returned.promise().then( newDefer.resolve, newDefer.reject );
|
||||
} else {
|
||||
newDefer[ action ]( returned );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue