From e8604bd320689adac06a82f8aea5e433e801b02f Mon Sep 17 00:00:00 2001 From: Alexander Blair Date: Wed, 15 Feb 2017 17:24:17 -0800 Subject: [PATCH] Need to typeof the subkey. --- lib/pool.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/pool.js b/lib/pool.js index 212270a..f2084b9 100644 --- a/lib/pool.js +++ b/lib/pool.js @@ -236,11 +236,11 @@ function Miner(id, login, pass, ipAddress, startingDiff, messageSender, protoVer if (typeof(addressSplit[1]) !== 'undefined' && addressSplit[1].length === 64 && hexMatch.test(addressSplit[1])) { this.paymentID = addressSplit[1]; this.payout = this.address + "." + this.paymentID; - } else if (addressSplit[1] !== 'undefined') { - this.identifier = this.identifier === 'x' ? addressSplit[1] : pass_split[0]; + } else if (typeof(addressSplit[1]) !== 'undefined') { + this.identifier = pass_split[0] === 'x' ? addressSplit[1] : pass_split[0]; } if (typeof(addressSplit[2]) !== 'undefined') { - this.identifier = this.identifier === 'x' ? addressSplit[2] : pass_split[0]; + this.identifier = pass_split[0] === 'x' ? addressSplit[2] : pass_split[0]; } if (pass_split.length === 2) {