diff options
Diffstat (limited to 'lib/torrent.js')
-rw-r--r-- | lib/torrent.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/torrent.js b/lib/torrent.js index 39a725f..c81d33b 100644 --- a/lib/torrent.js +++ b/lib/torrent.js @@ -46,7 +46,7 @@ const RECHOKE_OPTIMISTIC_DURATION = 2 // 30 seconds // IndexedDB chunk stores used in the browser benefit from maximum concurrency const FILESYSTEM_CONCURRENCY = process.browser ? Infinity : 2 -const RECONNECT_WAIT = [ 1000, 5000, 15000 ] +const RECONNECT_WAIT = [1000, 5000, 15000] const VERSION = require('../package.json').version const USER_AGENT = `WebTorrent/${VERSION} (https://webtorrent.io)` @@ -169,7 +169,7 @@ class Torrent extends EventEmitter { if (typeof window === 'undefined') throw new Error('browser-only property') if (!this.torrentFile) return null return URL.createObjectURL( - new Blob([ this.torrentFile ], { type: 'application/x-bittorrent' }) + new Blob([this.torrentFile], { type: 'application/x-bittorrent' }) ) } @@ -348,7 +348,7 @@ class Torrent extends EventEmitter { // to allow function hoisting const self = this - const urls = Array.isArray(this.xs) ? this.xs : [ this.xs ] + const urls = Array.isArray(this.xs) ? this.xs : [this.xs] const tasks = urls.map(url => cb => { getMetadataFromURL(url, cb) @@ -1564,7 +1564,7 @@ class Torrent extends EventEmitter { if (this.destroyed) throw new Error('torrent is destroyed') if (!this.ready) return this.once('ready', () => { this.load(streams, cb) }) - if (!Array.isArray(streams)) streams = [ streams ] + if (!Array.isArray(streams)) streams = [streams] if (!cb) cb = noop const readable = new MultiStream(streams) |