Ticket #5899 (closed defect: fixed)
[cla][patch][unit test]dojo DeferredList return broken (plus fix for typo)
| Reported by: | tvachon | Owned by: | dmachi |
|---|---|---|---|
| Priority: | high | Milestone: | 1.1 |
| Component: | General | Version: | 1.0 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Currently, the following code:
var d1 = new dojo.Deferred();
var d2 = new dojo.Deferred();
var dl = new dojo.DeferredList([d1, d2]);
dl.addCallback(function(res){
console.log(res);
});
d1.callback("foo");
d2.callback("bar");
prints a list like [undefined, [true, "foo"], [true, "bar]] to the console, when it should be printing [[true, "foo"], [true, "bar"]]
Attached patch fixes this and adds some basic regression tests.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.