diff options
author | Feross Aboukhadijeh <feross@feross.org> | 2015-03-07 04:54:26 +0300 |
---|---|---|
committer | Feross Aboukhadijeh <feross@feross.org> | 2015-03-07 04:54:26 +0300 |
commit | 7ba50a46f79cc778727a047e121bfdcbb16fd50e (patch) | |
tree | ac7382c8570d058265b208db02e29d4130ef93a2 /index.js | |
parent | 2a3c90fb20942ab7e6eee709508d3564b349cc01 (diff) |
style: always use braces
Diffstat (limited to 'index.js')
-rw-r--r-- | index.js | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -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) } |