Fix wallet breaking error on startup

v0.1.3
dsc 5 years ago
parent 1609ceb22d
commit 2a6d8752e4
No known key found for this signature in database
GPG Key ID: 7BBC83D7A8810AAB

@ -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();

Loading…
Cancel
Save