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

Merge pull request #1525 from bitwarden/hotfix/action-buttons

Fix action buttons not working when TOTP is not available
This commit is contained in:
Oscar Hinton 2021-01-11 16:28:00 +01:00 committed by GitHub
commit 7e41e84c7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,7 +57,7 @@ export class ActionButtonsComponent {
} }
async copy(cipher: CipherView, value: string, typeI18nKey: string, aType: string) { async copy(cipher: CipherView, value: string, typeI18nKey: string, aType: string) {
if (value == null || !this.displayTotpCopyButton(cipher)) { if (value == null || aType === 'TOTP' && !this.displayTotpCopyButton(cipher)) {
return; return;
} else if (value === cipher.login.totp) { } else if (value === cipher.login.totp) {
value = await this.totpService.getCode(value); value = await this.totpService.getCode(value);