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:
authorFeross Aboukhadijeh <feross@feross.org>2015-03-07 04:54:26 +0300
committerFeross Aboukhadijeh <feross@feross.org>2015-03-07 04:54:26 +0300
commit7ba50a46f79cc778727a047e121bfdcbb16fd50e (patch)
treeac7382c8570d058265b208db02e29d4130ef93a2 /index.js
parent2a3c90fb20942ab7e6eee709508d3564b349cc01 (diff)
style: always use braces
Diffstat (limited to 'index.js')
-rw-r--r--index.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/index.js b/index.js
index bb1ddb1..4364ca0 100644
--- a/index.js
+++ b/index.js
@@ -217,9 +217,11 @@ WebTorrent.prototype.seed = function (input, opts, onseed) {
var tasks = [function (cb) {
torrent.storage.load(streams, cb)
}]
- if (self.dht) tasks.push(function (cb) {
- torrent.on('dhtAnnounce', cb)
- })
+ if (self.dht) {
+ tasks.push(function (cb) {
+ torrent.on('dhtAnnounce', cb)
+ })
+ }
parallel(tasks, function (err) {
if (err) return self.emit('error', err)
if (onseed) onseed(torrent)
@@ -259,9 +261,11 @@ WebTorrent.prototype.destroy = function (cb) {
}
})
- if (self.dht) tasks.push(function (cb) {
- self.dht.destroy(cb)
- })
+ if (self.dht) {
+ tasks.push(function (cb) {
+ self.dht.destroy(cb)
+ })
+ }
parallel(tasks, cb)
}