From a2919017fce8af0695c38c6f4c4851e6ef211b5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Val=C3=A9rian=20Galliat?= Date: Thu, 10 Sep 2015 18:47:15 +0200 Subject: Always pass 'elem' to 'append-to' callback Looks like it was forgotten for 'img' and 'iframe'. --- lib/append-to.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/append-to.js b/lib/append-to.js index 8976e56..c68e3f9 100644 --- a/lib/append-to.js +++ b/lib/append-to.js @@ -136,7 +136,7 @@ module.exports = function appendTo (file, rootElem, cb) { elem.src = url elem.alt = file.name rootElem.appendChild(elem) - cb(null) + cb(null, elem) }) } @@ -147,7 +147,7 @@ module.exports = function appendTo (file, rootElem, cb) { elem.src = url if (extname !== '.pdf') elem.sandbox = 'allow-forms allow-scripts' rootElem.appendChild(elem) - cb(null) + cb(null, elem) }) } -- cgit v1.2.3