From 6a176b59049f2240c564194aea7ef4929b643c8c Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Thu, 18 Jul 2019 19:27:53 +0200 Subject: [PATCH] Fix empty name in account info When the user brings Ethereum accounts, but none of them is known as contributor, instead of "Anonymous" it just shows nothing. This fixes the if condition in the template to eliminate the faulty case. --- app/components/topbar-account-panel/template.hbs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/components/topbar-account-panel/template.hbs b/app/components/topbar-account-panel/template.hbs index b65983a..080621a 100644 --- a/app/components/topbar-account-panel/template.hbs +++ b/app/components/topbar-account-panel/template.hbs @@ -1,10 +1,8 @@
- {{#if kredits.hasAccounts }} - {{#if kredits.currentUser}} - {{kredits.currentUser.name}} - {{#if kredits.currentUserIsCore}} - (core) - {{/if}} + {{#if (and kredits.hasAccounts kredits.currentUser)}} + {{kredits.currentUser.name}} + {{#if kredits.currentUserIsCore}} + (core) {{/if}} {{else}} Anonymous