diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/images.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/images.js b/lib/images.js index c7d3ef5..fc45115 100644 --- a/lib/images.js +++ b/lib/images.js @@ -8,10 +8,12 @@ exports.imgElement = imgElement; function imgElement(func) { return function(element, messages) { return promises.when(func(element)).then(function(result) { - var attributes = _.clone(result); + var attributes = {}; if (element.altText) { attributes.alt = element.altText; } + _.extend(attributes, result); + return [Html.freshElement("img", attributes)]; }); }; |
