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