…h needed unit tests added!
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -44,7 +44,7 @@ jQuery.extend({ | ||
// Get a promise for this deferred | ||
// If obj is provided, the promise aspect is added to the object | ||
promise: function( obj ) { | ||
return typeof obj === "object" ? jQuery.extend( obj, promise ) : promise; | ||
return obj != null ? jQuery.extend( obj, promise ) : promise; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
rwaldron
Member
|
||
} | ||
}, | ||
deferred = {}; | ||
3 comments
on commit 74cdd78
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... and this was done, tested and all on the iPad \o/
/me is mobile now :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jaubourg ooooo cloud9?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rwldrn nope, I rooted the thing. Gotta try and install flash on it to be able to use browserstack btw.
Could do with a comment making it explicit that it is intentional that all objects are supported (even objects that aren't
typeof object
), e.g. including function objects. Since it was a bugfix and is documented behavior.Another common test is to verify that something is an object (including function objects) is
Object( obj ) !== obj
.