Fix context copy buttons work only with TOTP present (#794)

This commit is contained in:
Matt Gibson 2021-01-20 15:15:19 -06:00 committed by GitHub
parent 24af5aca55
commit 99c8082866
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -125,7 +125,7 @@ export class CiphersComponent extends BaseCiphersComponent implements OnDestroy
}
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;
} else if (value === cipher.login.totp) {
value = await this.totpService.getCode(value);