From edac8ac9b569cae8a32b2ca837941fe8f05c4f78 Mon Sep 17 00:00:00 2001 From: XiaoJun Date: Fri, 8 Sep 2017 15:49:41 +0800 Subject: [PATCH] fix debug function undefined bug --- lib/torrent.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/torrent.js b/lib/torrent.js index 432caa1b..fb3656c5 100644 --- a/lib/torrent.js +++ b/lib/torrent.js @@ -1647,6 +1647,7 @@ Torrent.prototype.resume = function () { } Torrent.prototype._debug = function () { + if (this.destroyed) return var args = [].slice.call(arguments) args[0] = '[' + this.client._debugId + '] [' + this._debugId + '] ' + args[0] debug.apply(null, args)