Modify ↓
Ticket #12521 (closed bug: fixed)
Deferred.promise( target) only works fine when typeof( target)=='object'
| Reported by: | lars.gersmann@… | Owned by: | jaubourg |
|---|---|---|---|
| Priority: | blocker | Milestone: | 1.8.2 |
| Component: | deferred | Version: | 1.8.1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Deferred.promise( target) should work fine for any type of target except null and undefined.
Before version 1.8.0 (i used version 1.7.2) you could do
var tracker = $.Deferred(); var foo = function() { }; foo = tracker.promise( foo); foo();
Since version 1.8.0 the same code returns just the promise instead of the extend function.
Should be easy to fix.
Change History
comment:1 Changed 9 months ago by jaubourg
- Owner set to jaubourg
- Priority changed from undecided to blocker
- Status changed from new to assigned
- Component changed from unfiled to deferred
- Milestone changed from None to 1.8.2
comment:2 Changed 9 months ago by jaubourg
- Status changed from assigned to closed
- Resolution set to fixed
deferred.promise(obj) should work with non-objects. Fixes #12521. Much needed unit tests added!
Changeset: 74cdd784975ba6e628d1934a859faeb017824a5f
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

Silly, silly regression. Thanks for catching this one.