From 7ba50a46f79cc778727a047e121bfdcbb16fd50e Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Fri, 6 Mar 2015 17:54:26 -0800 Subject: style: always use braces --- index.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'index.js') 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) } -- cgit v1.2.3