mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
Correctly set biometric state on connect failure
This commit is contained in:
@@ -152,10 +152,16 @@ export default class MainBackground {
|
||||
this.systemService.clearClipboard(clipboardValue, clearMs);
|
||||
}
|
||||
},
|
||||
() => {
|
||||
async () => {
|
||||
if (this.nativeMessagingBackground != null) {
|
||||
const promise = this.nativeMessagingBackground.getResponse();
|
||||
this.nativeMessagingBackground.send({command: 'biometricUnlock'})
|
||||
|
||||
try {
|
||||
await this.nativeMessagingBackground.send({command: 'biometricUnlock'});
|
||||
} catch (e) {
|
||||
return Promise.reject(e);
|
||||
}
|
||||
|
||||
return promise.then((result) => result.response === 'unlocked');
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user