mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-23 11:56:00 +01:00
dont throw error on none found
This commit is contained in:
parent
c1fd8e47fb
commit
b6a5180a6a
@ -206,14 +206,13 @@ export default class AutofillService {
|
||||
return;
|
||||
}
|
||||
|
||||
const cipher = await this.cipherService.getLastUsedForDomain(tabDomain);
|
||||
if (!cipher) {
|
||||
const lastUsedCipher = await this.cipherService.getLastUsedForDomain(tabDomain);
|
||||
if (!lastUsedCipher) {
|
||||
return;
|
||||
}
|
||||
|
||||
await this.doAutoFill({
|
||||
// tslint:disable-next-line
|
||||
cipher: cipher,
|
||||
cipher: lastUsedCipher,
|
||||
// tslint:disable-next-line
|
||||
pageDetails: pageDetails,
|
||||
fromBackground: true,
|
||||
|
@ -235,7 +235,7 @@ export default class CipherService {
|
||||
async getLastUsedForDomain(domain: string): Promise<any> {
|
||||
const ciphers = await this.getAllDecryptedForDomain(domain);
|
||||
if (ciphers.length === 0) {
|
||||
throw new Error('No ciphers.');
|
||||
return null;
|
||||
}
|
||||
|
||||
const sortedCiphers = ciphers.sort(CipherService.sortCiphersByLastUsed);
|
||||
|
Loading…
Reference in New Issue
Block a user