fix tests

This commit is contained in:
Jonathan Rainville 2018-05-28 15:56:03 -04:00
parent 4df669ab52
commit 2023689eb2
1 changed files with 3 additions and 3 deletions

View File

@ -56,15 +56,15 @@ var Blockchain = function(options) {
} }
const spaceMessage = 'The path for %s in blockchain config contains spaces, please remove them'; const spaceMessage = 'The path for %s in blockchain config contains spaces, please remove them';
if (this.config.datadir.indexOf(' ') > 0) { if (this.config.datadir && this.config.datadir.indexOf(' ') > 0) {
console.error(__(spaceMessage, 'datadir')); console.error(__(spaceMessage, 'datadir'));
process.exit(); process.exit();
} }
if (this.config.account.password.indexOf(' ') > 0) { if (this.config.account.password && this.config.account.password.indexOf(' ') > 0) {
console.error(__(spaceMessage, 'account.password')); console.error(__(spaceMessage, 'account.password'));
process.exit(); process.exit();
} }
if (this.config.genesisBlock.indexOf(' ') > 0) { if (this.config.genesisBlock && this.config.genesisBlock.indexOf(' ') > 0) {
console.error(__(spaceMessage, 'genesisBlock')); console.error(__(spaceMessage, 'genesisBlock'));
process.exit(); process.exit();
} }