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:
authorjsdt <jeffreydallatezza@gmail.com>2020-01-02 18:43:05 +0300
committerKaylee <34007889+KayleePop@users.noreply.github.com>2020-01-03 23:16:37 +0300
commit748d9ba78cf285c53b48a68027a80de615c888a3 (patch)
tree08b219eb75dcd0216ca575f805b5aeafc22c3409
parent960977f4830069468aacfb2c4dd75dc3a77e4e6b (diff)
Check if client is set when debug logging.
-rw-r--r--lib/torrent.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/torrent.js b/lib/torrent.js
index 77cf898..e6ab569 100644
--- a/lib/torrent.js
+++ b/lib/torrent.js
@@ -1630,7 +1630,7 @@ class Torrent extends EventEmitter {
_debug () {
const args = [].slice.call(arguments)
- args[0] = `[${this.client._debugId}] [${this._debugId}] ${args[0]}`
+ args[0] = `[${this.client ? this.client._debugId : 'No Client'}] [${this._debugId}] ${args[0]}`
debug(...args)
}