1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-28 12:45:45 +01:00

Merge pull request #1517 from wusatosi/patch-1

Improved readability as #1441
This commit is contained in:
Chad Scharf 2021-01-04 12:15:13 -05:00 committed by GitHub
commit d68971c82c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -254,7 +254,7 @@ export default class AutofillService implements AutofillServiceInterface {
}
}
const autoFillResponse = await this.doAutoFill({
const totpCode = await this.doAutoFill({
cipher: cipher,
pageDetails: pageDetails,
skipTotp: !fromCommand,
@ -265,12 +265,12 @@ export default class AutofillService implements AutofillServiceInterface {
fillNewPassword: fromCommand,
});
// Only update last used index if doAutoFill didn't throw an exception
// Update last used index as autofill has succeed
if (fromCommand) {
this.cipherService.updateLastUsedIndexForUrl(tab.url);
}
return autoFillResponse;
return totpCode;
}
// Helpers