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() {
|
function iterate() {
|
||||||
var url = urls.shift();
|
var url = urls.shift();
|
||||||
Ox.getAsync(url, function(result, error) {
|
Ox.getAsync(url, get, function(result, error) {
|
||||||
Ox.extend(results, url, result);
|
results[url] = result;
|
||||||
Ox.extend(errors, url, error);
|
errors[url] = error;
|
||||||
urls.length ? iterate() : done();
|
urls.length ? iterate() : done();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -71,8 +71,8 @@ Ox.getAsync = function(urls, get, callback) {
|
||||||
} else {
|
} else {
|
||||||
urls.forEach(function(url) {
|
urls.forEach(function(url) {
|
||||||
get(url, function(result, error) {
|
get(url, function(result, error) {
|
||||||
Ox.extend(results, url, result);
|
results[url] = result;
|
||||||
Ox.extend(errors, url, error);
|
errors[url] = error;
|
||||||
++i == n && done();
|
++i == n && done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue