aboutsummaryrefslogtreecommitdiffstats
path: root/src/deferred.js
diff options
context:
space:
mode:
authorjaubourg <j@ubourg.net>2011-05-09 10:01:20 +0200
committerjaubourg <j@ubourg.net>2011-05-09 10:01:20 +0200
commit8c13cfa805c0576a2f02f33beb9d15d73afd2d41 (patch)
tree60800ca1ee6427e85cf51569ea1403d49e78f408 /src/deferred.js
parentefd0fce7a1ae9bc62ef2b1aa51d7adc224da1ec0 (diff)
downloadjquery-8c13cfa805c0576a2f02f33beb9d15d73afd2d41.tar.gz
jquery-8c13cfa805c0576a2f02f33beb9d15d73afd2d41.zip
Fixes #9104. Returning null or undefined in a pipe callback shouldn't end up throwing an exception. Silly, silly, me.
Diffstat (limited to 'src/deferred.js')
-rw-r--r--src/deferred.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/deferred.js b/src/deferred.js
index 02f92b26c..5cc5fb5be 100644
--- a/src/deferred.js
+++ b/src/deferred.js
@@ -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 );