Need to typeof the subkey.

This commit is contained in:
Alexander Blair
2017-02-15 17:24:17 -08:00
parent b64307deef
commit e8604bd320
+3 -3
View File
@@ -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) {