diff options
author | Valérian Galliat <val@codejam.info> | 2015-09-10 19:47:15 +0300 |
---|---|---|
committer | Valérian Galliat <val@codejam.info> | 2015-09-10 19:47:15 +0300 |
commit | a2919017fce8af0695c38c6f4c4851e6ef211b5e (patch) | |
tree | 8d492584974750c9bb3d8d7b854dcb8ea0f45bae | |
parent | 5afdec34769248e672cafc7c73a12feedf73b9ec (diff) |
Always pass 'elem' to 'append-to' callback
Looks like it was forgotten for 'img' and 'iframe'.
-rw-r--r-- | lib/append-to.js | 4 |
1 files 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) }) } |