FIX: Blank second factor gets default name

FIX: Blank second factor gets default name

diff --git a/app/assets/javascripts/discourse/templates/preferences-second-factor.hbs b/app/assets/javascripts/discourse/templates/preferences-second-factor.hbs
index 37f8941..bcd2f6f 100644
--- a/app/assets/javascripts/discourse/templates/preferences-second-factor.hbs
+++ b/app/assets/javascripts/discourse/templates/preferences-second-factor.hbs
@@ -36,7 +36,11 @@
             label="user.second_factor.totp.add"}}
           {{#each totps as |totp|}}
             <div class="second-factor-item">
-              {{totp.name}}
+              {{#if totp.name}}
+                {{totp.name}}
+              {{else}}
+                {{i18n "user.second_factor.totp.default_name"}}
+              {{/if}}
 
               {{#if isCurrentUser}}
                 {{d-button action=(action "editSecondFactor" totp)

GitHub sha: 4cd0cd2f

1 Like

This commit has been mentioned on Discourse Meta. There might be relevant details there: