mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 23:03:32 +00:00
Update last used index when auto-fill worked correctly (#1425)
This commit is contained in:
2
jslib
2
jslib
Submodule jslib updated: f30d6f8027...e371d737b0
@@ -234,7 +234,7 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||
cipher = await this.cipherService.getLastUsedForUrl(tab.url);
|
||||
}
|
||||
|
||||
return await this.doAutoFill({
|
||||
const autoFillResponse = await this.doAutoFill({
|
||||
cipher: cipher,
|
||||
pageDetails: pageDetails,
|
||||
skipTotp: !fromCommand,
|
||||
@@ -244,6 +244,13 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||
onlyVisibleFields: !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
|
||||
|
||||
Reference in New Issue
Block a user