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
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/file.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/file.js b/lib/file.js
index 8bcfe22..993e06a 100644
--- a/lib/file.js
+++ b/lib/file.js
@@ -104,7 +104,8 @@ class File extends EventEmitter {
getBlob (cb) {
if (typeof window === 'undefined') throw new Error('browser-only method')
- streamToBlob(this.createReadStream(), this._getMimeType(), cb)
+ streamToBlob(this.createReadStream(), this._getMimeType())
+ .then(blob => cb(null, blob), cb)
}
getBlobURL (cb) {