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:
authorfisch0920 <fisch0920@gmail.com>2014-05-12 13:19:34 +0400
committerfisch0920 <fisch0920@gmail.com>2014-05-12 13:19:34 +0400
commit25c9080664a9d8814442d2e867dfeee0ff8b3a57 (patch)
treeb1332a1d0f62c74be9563aac8ed85bd85741d821 /index.js
parentc84b50acdba65ebb6d1449cd01a58b904efbbc7b (diff)
parentc95d8d947cb96c75d2f8a51e561af5fdd32dbd95 (diff)
merging latest changes with addition of working commandline PR
Diffstat (limited to 'index.js')
-rw-r--r--index.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/index.js b/index.js
index 4a2ac45..5d3e1f8 100644
--- a/index.js
+++ b/index.js
@@ -28,7 +28,7 @@ function WebTorrent (opts) {
WebTorrent.prototype.add = function (torrentId, cb) {
var self = this
- if (!cb) cb = function () {}
+ if (typeof cb !== 'function') cb = function () {}
// TODO: support passing in an index to file to download
// self.index = opts.index