dont loop over files twice
This commit is contained in:
parent
461cd3d686
commit
e765153f9c
1 changed files with 2 additions and 2 deletions
|
@ -177,7 +177,7 @@ Ox.loadFiles = (function() {
|
||||||
return function(files, callback) {
|
return function(files, callback) {
|
||||||
var i = 0, n = files.length, images = {};
|
var i = 0, n = files.length, images = {};
|
||||||
files.forEach(function(file) {
|
files.forEach(function(file) {
|
||||||
loadFiles(files, function(images_) {
|
loadFiles(file, function(images_) {
|
||||||
Ox.extend(images, images_)
|
Ox.extend(images, images_)
|
||||||
++i == n && callback(Ox.len(images) ? images : void 0);
|
++i == n && callback(Ox.len(images) ? images : void 0);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue