From 88c1cd50a70fcbdaceea284f914a034f31ce7af9 Mon Sep 17 00:00:00 2001 From: Zed Date: Sun, 11 Aug 2019 23:30:33 +0200 Subject: [PATCH] Show ? if profile stat unavailable --- src/views/profile.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/views/profile.nim b/src/views/profile.nim index efb8105..deecd22 100644 --- a/src/views/profile.nim +++ b/src/views/profile.nim @@ -8,7 +8,8 @@ proc renderStat(num, class: string; text=""): VNode = let t = if text.len > 0: text else: class buildHtml(li(class=class)): span(class="profile-stat-header"): text capitalizeAscii(t) - span(class="profile-stat-num"): text num + span(class="profile-stat-num"): + text if num.len == 0: "?" else: num proc renderProfileCard*(profile: Profile): VNode = buildHtml(tdiv(class="profile-card")):