From 50a845fa2917965347eb5c29f0b8afd3417448f9 Mon Sep 17 00:00:00 2001 From: rolux Date: Thu, 9 May 2013 22:32:19 +0200 Subject: [PATCH] fix Ox.getAsync --- source/Ox/js/Request.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/Ox/js/Request.js b/source/Ox/js/Request.js index 26bb7a1d..640a932a 100644 --- a/source/Ox/js/Request.js +++ b/source/Ox/js/Request.js @@ -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(); }); });