Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValérian Galliat <val@codejam.info>2015-09-10 19:47:15 +0300
committerValérian Galliat <val@codejam.info>2015-09-10 19:47:15 +0300
commita2919017fce8af0695c38c6f4c4851e6ef211b5e (patch)
tree8d492584974750c9bb3d8d7b854dcb8ea0f45bae
parent5afdec34769248e672cafc7c73a12feedf73b9ec (diff)
Always pass 'elem' to 'append-to' callback
Looks like it was forgotten for 'img' and 'iframe'.
-rw-r--r--lib/append-to.js4
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)
})
}