Permalink
Browse files

Merge pull request #15 from wownero/fix-wallets-json

Fix wallet breaking error on startup
  • Loading branch information...
xmrdsc committed Jan 25, 2019
2 parents 1609ceb + 2a6d875 commit 575f5b0d785a8814cd755632fc84c51da20da0d1
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/main/config.js
@@ -61,6 +61,7 @@ export class Config {
}

saveLastWalletPath(path){
console.log(this.data);
if (typeof this.data === 'string' || this.data instanceof String){
this.data = JSON.parse(this.data);
}
@@ -69,6 +70,10 @@ export class Config {
return;
}

if(!this.data.hasOwnProperty('wallets')){
this.data.wallets = [];
}

const name = path.split('/').pop();
this.data.wallets.push({ name, path });
this.save();

0 comments on commit 575f5b0

Please sign in to comment.