diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-06-09 23:15:15 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-06-20 12:06:19 +0100 |
| commit | 9f9bc763f60e5ef4f22212c52964bde3d3574e26 (patch) | |
| tree | deb72d7fb314ee64146e6a3ed6d135d1834d7da6 /lib/images.js | |
| parent | ac3981df81148fad21c32b22496ecc145ad36e98 (diff) | |
Batch up async conversions until end of conversion
Diffstat (limited to 'lib/images.js')
| -rw-r--r-- | lib/images.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/images.js b/lib/images.js index 6aac18a..fdc3601 100644 --- a/lib/images.js +++ b/lib/images.js @@ -4,16 +4,14 @@ var promises = require("./promises"); var Html = require("./html"); exports.imgElement = function(func) { - return function(element, messages, callback) { + return function(element, messages) { return promises.when(func(element)).then(function(result) { var attributes = _.clone(result); if (element.altText) { attributes.alt = element.altText; } return [Html.selfClosingElement("img", attributes)]; - }).then(function(value) { - callback(null, value); - }, callback); + }); }; }; |
