fix Ox.getAsync
This commit is contained in:
parent
63667f04a0
commit
50a845fa29
1 changed files with 5 additions and 5 deletions
|
@ -60,9 +60,9 @@ Ox.getAsync = function(urls, get, callback) {
|
|||
}
|
||||
function iterate() {
|
||||
var url = urls.shift();
|
||||
Ox.getAsync(url, function(result, error) {
|
||||
Ox.extend(results, url, result);
|
||||
Ox.extend(errors, url, error);
|
||||
Ox.getAsync(url, get, function(result, error) {
|
||||
results[url] = result;
|
||||
errors[url] = error;
|
||||
urls.length ? iterate() : done();
|
||||
});
|
||||
}
|
||||
|
@ -71,8 +71,8 @@ Ox.getAsync = function(urls, get, callback) {
|
|||
} else {
|
||||
urls.forEach(function(url) {
|
||||
get(url, function(result, error) {
|
||||
Ox.extend(results, url, result);
|
||||
Ox.extend(errors, url, error);
|
||||
results[url] = result;
|
||||
errors[url] = error;
|
||||
++i == n && done();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue