Move irrelevant stuff out of try block
This commit is contained in:
1 parent
d8c8f5034e
commit
9cc9cb6d3e
1 file changed
+3
-2
@@ -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 => {
|
||||
|
||||
Reference in new issue
Block a user