From c9507678e6ca5a419d4ce8990bdc1870cc4890f9 Mon Sep 17 00:00:00 2001
From: Alfredo Sumaran <alfredo@gitlab.com>
Date: Thu, 17 Nov 2016 16:39:38 -0500
Subject: [PATCH] Show seconds only if time is only in seconds

---
 .../cycle_analytics/components/total_time_component.js.es6      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/assets/javascripts/cycle_analytics/components/total_time_component.js.es6 b/app/assets/javascripts/cycle_analytics/components/total_time_component.js.es6
index ebecd2fb7d4..02f518565ed 100644
--- a/app/assets/javascripts/cycle_analytics/components/total_time_component.js.es6
+++ b/app/assets/javascripts/cycle_analytics/components/total_time_component.js.es6
@@ -10,7 +10,7 @@
         <template v-if="time.days">{{ time.days }} <span>{{ time.days === 1 ? 'day' : 'days' }}</span></template>
         <template v-if="time.hours">{{ time.hours }} <span>hr</span></template>
         <template v-if="time.mins">{{ time.mins }} <span>mins</span></template>
-        <template v-if="time.seconds && !time.mins">{{ time.seconds }} <span>s</span></template>
+        <template v-if="time.seconds && Object.keys(time).length === 1">{{ time.seconds }} <span>s</span></template>
       </span>
     `,
   });
-- 
2.30.9