diff --git a/source/Ox/js/Request.js b/source/Ox/js/Request.js index a823de38..35eac5d3 100644 --- a/source/Ox/js/Request.js +++ b/source/Ox/js/Request.js @@ -51,7 +51,7 @@ Ox.getAsync = function(urls, get, callback) { urls = Ox.clone(Ox.makeArray(urls)); var errors = {}, i = 0, n = urls.length, results = {}; function done() { - callback( + callback && callback( n == 1 ? results[urls[0]] : results, n == 1 ? errors[urls[0]] : Ox.some(errors, function(error) { return error !== null; @@ -214,9 +214,7 @@ Ox.getJSONC Get and parse a remote JSONC file For multiple URLs, keys are file names, values are error objects @*/ Ox.getJSONC = function(url, callback) { - Ox.getJSON(url, function(results, errors) { - callback(results, errors); - }, true); + Ox.getJSON(url, callback, true); }; /*@