Fix “Unnecessary 'else' after 'return’”

This commit is contained in:
Samuel Elliott 2018-08-23 20:26:23 +01:00
parent 5fa964ed50
commit 6c14f80791
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6
1 changed files with 3 additions and 3 deletions

View File

@ -77,10 +77,10 @@ export default new class E2EE extends BuiltinModule {
const newMaster = Security.randomBytes();
await ClientIPC.setPassword('betterdiscord', 'master', newMaster);
return this.setMaster(newMaster);
} else {
const newMaster = await Modals.input('Open Database', 'Master Password', true).promise;
return this.setMaster(newMaster);
}
const newMaster = await Modals.input('Open Database', 'Master Password', true).promise;
return this.setMaster(newMaster);
} catch (err) {
Settings.getSetting(...this.settingPath).value = false;
Toasts.error('Invalid master password! E2EE Disabled');