diff options
Diffstat (limited to 'lib/utils/page.js')
-rw-r--r-- | lib/utils/page.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/utils/page.js b/lib/utils/page.js index b072fcf..f58e25a 100644 --- a/lib/utils/page.js +++ b/lib/utils/page.js @@ -232,10 +232,10 @@ function convertImages(images, options) { var downloaded = []; options.book.log.debug.ln("convert ", images.length, "images to png"); - return _.reduce(images, function(prev, image) { + return Q.all(_.map(images, function(image) { var imgin = path.resolve(options.book.options.output, image.source); - return prev + return Q() // Write image if need to be download .then(function() { @@ -258,7 +258,7 @@ function convertImages(images, options) { options.book.log.debug("convert image", image.source, "to", image.dest, "..."); return options.book.log.debug.promise(imgUtils.convertSVG(imgin, imgout)); }); - }, Q()) + })) .then(function() { options.book.log.debug.ok(images.length+" images converted with success"); }); |