diff --git a/source/Ox.js b/source/Ox.js index faaf6f24..41e59067 100644 --- a/source/Ox.js +++ b/source/Ox.js @@ -15,7 +15,6 @@ loadScriptsSerial(data.files, function() { Ox.VERSION = data.version; if (args.length == 1) { - console.log(document.body); callback() } else { Ox.load.apply(null, args); diff --git a/source/Ox/js/Core.js b/source/Ox/js/Core.js index 4e2c4bfc..9231bf54 100644 --- a/source/Ox/js/Core.js +++ b/source/Ox/js/Core.js @@ -116,7 +116,7 @@ Ox.load Loads one or more modules @*/ Ox.load = function() { var callback = arguments[arguments.length - 1], - counter = 0, length, modules = {}, success = 0, + length, loaded = 0, modules = {}, succeeded = 0, type = Ox.typeOf(arguments[0]); if (type == 'string') { modules = Ox.extend( @@ -138,9 +138,9 @@ Ox.load = function() { Ox.getFile( Ox.PATH + 'Ox.' + module + '/Ox.' + module + '.js', function() { - Ox.load[module](options, function(s) { - success += s; - ++counter == length && callback(success == counter); + Ox.load[module](options, function(success) { + succeeded += success; + ++loaded == length && callback(succeeded == length); }); } );