diff --git a/lib/blockchain.js b/lib/blockchain.js index 52695c06..73b6875a 100644 --- a/lib/blockchain.js +++ b/lib/blockchain.js @@ -85,11 +85,11 @@ Blockchain.prototype.run_command = function(address, use_tmp) { cmd += "--nat \"" + config.nat + "\""; } - if (config.bootNodes.boot == true){ + if (config.bootNodes !== undefined && config.bootNodes.boot == true) { cmd += "--bootnodes \""; for (var i = 0; i < config.bootNodes.enodes.length; i++){ cmd += config.bootNodes.enodes[i]; - if (i != config.bootNodes.enodes.lenth - 1) cmd += " "; + if (i != config.bootNodes.enodes.length - 1) cmd += " "; } cmd += "\""; }