From b2645869eca1883c94c14d2efde88274fb104b0b Mon Sep 17 00:00:00 2001 From: jan Date: Thu, 5 Jan 2023 00:00:44 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20[docs/bugs]=20hopefully=20fix=20?= =?UTF-8?q?random=20docs=20build=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/.vuepress/components/bug-list.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/.vuepress/components/bug-list.vue b/docs/.vuepress/components/bug-list.vue index 11b6a30147..28a9357d05 100644 --- a/docs/.vuepress/components/bug-list.vue +++ b/docs/.vuepress/components/bug-list.vue @@ -108,10 +108,10 @@ const rtf = new Intl.RelativeTimeFormat('en', { const getRelativeTime = (d1, d2 = new Date()) => { const elapsed = d1.getTime() - d2.getTime(); - // "Math.abs" accounts for both "past" & "future" scenarios for (const unit in units) { + // "Math.abs" accounts for both "past" & "future" scenarios if (Math.abs(elapsed) > units[unit] || unit === 'second') - return rtf.format(Math.round(elapsed / units[unit]), unit); + return rtf.format(Math.round(elapsed / units[unit]) || 0, unit); } return elapsed.toLocaleString(); };