Move irrelevant stuff out of try block

This commit is contained in:
Julia Friesel
2018-09-17 16:37:54 +02:00
parent d8c8f5034e
commit 9cc9cb6d3e
+3 -2
View File
@@ -26,13 +26,14 @@ export default class PasswordPrompt extends Component {
async tryToOpenDb() {
try {
await openDb({ persistConnection: true })
await saveEncryptionFlag(false)
this.props.showApp()
} catch (err) {
this.setState({ showPasswordPrompt: true })
await saveEncryptionFlag(true)
return
}
await saveEncryptionFlag(false)
this.props.showApp()
}
passHashToDb = async hash => {