dont loop over files twice

This commit is contained in:
j 2012-04-19 14:19:57 +02:00
parent 461cd3d686
commit e765153f9c

View file

@ -177,10 +177,10 @@ Ox.loadFiles = (function() {
return function(files, callback) {
var i = 0, n = files.length, images = {};
files.forEach(function(file) {
loadFiles(files, function(images_) {
loadFiles(file, function(images_) {
Ox.extend(images, images_)
++i == n && callback(Ox.len(images) ? images : void 0);
});
});
};
}());
}());