From 97d4b85915459d5f9bcd97888cea5d6d32b37e67 Mon Sep 17 00:00:00 2001 From: Samuel Reed Date: Thu, 23 Feb 2017 10:13:52 -0600 Subject: [PATCH] Fix "Cannot read property 'requestedDisconnect' of null" Fixes #485 --- lib/irc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/irc.js b/lib/irc.js index 23ccfe08..c5d9bae8 100644 --- a/lib/irc.js +++ b/lib/irc.js @@ -933,7 +933,7 @@ Client.prototype.send = function(command) { if (this.opt.debug) util.log('SEND: ' + args.join(' ')); - if (!this.conn.requestedDisconnect) { + if (this.conn && !this.conn.requestedDisconnect) { this.conn.write(args.join(' ') + '\r\n'); } };