mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-02 08:40:08 +01:00
Update last used index when auto-fill worked correctly (#1425)
This commit is contained in:
parent
2e20192f1b
commit
c86151d74f
2
jslib
2
jslib
@ -1 +1 @@
|
|||||||
Subproject commit f30d6f8027055507abfdefd1eeb5d9aab25cc601
|
Subproject commit e371d737b0d3db99f195c3317ecf9eaa16bd19b3
|
@ -234,7 +234,7 @@ export default class AutofillService implements AutofillServiceInterface {
|
|||||||
cipher = await this.cipherService.getLastUsedForUrl(tab.url);
|
cipher = await this.cipherService.getLastUsedForUrl(tab.url);
|
||||||
}
|
}
|
||||||
|
|
||||||
return await this.doAutoFill({
|
const autoFillResponse = await this.doAutoFill({
|
||||||
cipher: cipher,
|
cipher: cipher,
|
||||||
pageDetails: pageDetails,
|
pageDetails: pageDetails,
|
||||||
skipTotp: !fromCommand,
|
skipTotp: !fromCommand,
|
||||||
@ -244,6 +244,13 @@ export default class AutofillService implements AutofillServiceInterface {
|
|||||||
onlyVisibleFields: !fromCommand,
|
onlyVisibleFields: !fromCommand,
|
||||||
fillNewPassword: fromCommand,
|
fillNewPassword: fromCommand,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Only update last used index if doAutoFill didn't throw an exception
|
||||||
|
if (fromCommand) {
|
||||||
|
this.cipherService.updateLastUsedIndexForUrl(tab.url);
|
||||||
|
}
|
||||||
|
|
||||||
|
return autoFillResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Helpers
|
// Helpers
|
||||||
|
Loading…
Reference in New Issue
Block a user