mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-29 17:38:04 +01:00
Pick first cipher matching url as no specific cipher was selected by the user when vault is locked
This commit is contained in:
parent
de1d26bd8d
commit
ec13cfd70c
@ -80,8 +80,16 @@ export default class ContextMenusBackground {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let cipher: CipherView;
|
||||||
|
if (id === 'noop') {
|
||||||
|
const ciphers = await this.cipherService.getAllDecryptedForUrl(tab.url);
|
||||||
|
cipher = ciphers.length > 0 ? ciphers[0] : null;
|
||||||
|
}
|
||||||
|
else {
|
||||||
const ciphers = await this.cipherService.getAllDecrypted();
|
const ciphers = await this.cipherService.getAllDecrypted();
|
||||||
const cipher = ciphers.find(c => c.id === id);
|
cipher = ciphers.find(c => c.id === id);
|
||||||
|
}
|
||||||
|
|
||||||
if (cipher == null) {
|
if (cipher == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user