From 8d2b84cbb35d129e123a37029cb6f35ed4bb5a34 Mon Sep 17 00:00:00 2001 From: wusatosi <26424577+wusatosi@users.noreply.github.com> Date: Sun, 3 Jan 2021 00:32:22 +0800 Subject: [PATCH] [ref] Improved readability for #1441 --- src/services/autofill.service.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/services/autofill.service.ts b/src/services/autofill.service.ts index 7498248bbe..82d5224a6e 100644 --- a/src/services/autofill.service.ts +++ b/src/services/autofill.service.ts @@ -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