mirror of
https://github.com/correl/melpa.git
synced 2025-03-07 04:45:08 -10:00
Patch the mithril patch slightly
This commit is contained in:
parent
84ab85461c
commit
70f2ea74a9
1 changed files with 2 additions and 3 deletions
|
@ -16,10 +16,9 @@
|
|||
var method = "resolve"
|
||||
function synchronizer(pos, resolved) {
|
||||
return function(value) {
|
||||
--outstanding
|
||||
results[pos] = value
|
||||
if (!resolved) method = "reject"
|
||||
if (outstanding == 0) {
|
||||
if (--outstanding == 0) {
|
||||
deferred.promise(results)
|
||||
deferred[method](results)
|
||||
}
|
||||
|
@ -31,7 +30,7 @@
|
|||
var outstanding = args.length
|
||||
var results = new Array(outstanding)
|
||||
for (var i = 0; i < args.length; i++) {
|
||||
args[i].then(synchronizer(i, true), synchronizer(false))
|
||||
args[i].then(synchronizer(i, true), synchronizer(i, false))
|
||||
}
|
||||
return deferred.promise
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue