diff options
author | Feross Aboukhadijeh <feross@feross.org> | 2015-06-11 04:41:38 +0300 |
---|---|---|
committer | Feross Aboukhadijeh <feross@feross.org> | 2015-06-11 04:43:45 +0300 |
commit | 38de6fd5893a10acc3c6b52ba3fad984e13854c6 (patch) | |
tree | 1046909ca486468296b2b20781daf5ec233f67c0 /lib | |
parent | 3c816df86c233b33bb5b6bfcfd6bb14411f36a51 (diff) |
return if destroyed
Diffstat (limited to 'lib')
-rw-r--r-- | lib/torrent.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/torrent.js b/lib/torrent.js index 941a266..4d7e65f 100644 --- a/lib/torrent.js +++ b/lib/torrent.js @@ -146,6 +146,7 @@ Object.defineProperty(Torrent.prototype, 'torrentFileURL', { Torrent.prototype._onTorrentId = function (torrentId) { var self = this + if (self.destroyed) return var parsedTorrent = torrentId && torrentId.parsedTorrent if (parsedTorrent) { self._onParsedTorrent(parsedTorrent) @@ -160,6 +161,7 @@ Torrent.prototype._onTorrentId = function (torrentId) { Torrent.prototype._onParsedTorrent = function (parsedTorrent) { var self = this + if (self.destroyed) return self.parsedTorrent = parsedTorrent self.infoHash = parsedTorrent.infoHash |