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:
-rw-r--r--index.js4
-rw-r--r--lib/torrent.js4
2 files changed, 4 insertions, 4 deletions
diff --git a/index.js b/index.js
index dbf91f0..9a0c46a 100644
--- a/index.js
+++ b/index.js
@@ -154,7 +154,7 @@ WebTorrent.prototype.download = function (torrentId, opts, ontorrent) {
if (typeof opts === 'function') return self.add(torrentId, null, opts)
debug('add')
if (!opts) opts = {}
- else opts = extend({}, opts)
+ else opts = extend(opts)
opts.client = self
@@ -202,7 +202,7 @@ WebTorrent.prototype.seed = function (input, opts, onseed) {
if (typeof opts === 'function') return self.seed(input, null, opts)
debug('seed')
if (!opts) opts = {}
- else opts = extend({}, opts)
+ else opts = extend(opts)
// When seeding from filesystem, initialize store from that path (avoids a copy)
if (typeof input === 'string') opts.path = path.dirname(input)
diff --git a/lib/torrent.js b/lib/torrent.js
index e61b59c..fc6fa19 100644
--- a/lib/torrent.js
+++ b/lib/torrent.js
@@ -7,7 +7,7 @@ var createTorrent = require('create-torrent')
var debug = require('debug')('webtorrent:torrent')
var Discovery = require('torrent-discovery')
var EventEmitter = require('events').EventEmitter
-var extend = require('xtend/mutable')
+var extendMutable = require('xtend/mutable')
var FSChunkStore = require('fs-chunk-store') // browser: `memory-chunk-store`
var ImmediateChunkStore = require('immediate-chunk-store')
var inherits = require('inherits')
@@ -252,7 +252,7 @@ Torrent.prototype._processParsedTorrent = function (parsedTorrent) {
uniq(parsedTorrent.announce)
- extend(this, parsedTorrent)
+ extendMutable(this, parsedTorrent)
this.magnetURI = parseTorrent.toMagnetURI(parsedTorrent)
this.torrentFile = parseTorrent.toTorrentFile(parsedTorrent)