From c31cb7540dcf63baeab1a9b146b28b831a19dd05 Mon Sep 17 00:00:00 2001 From: TwiN Date: Sun, 12 Jun 2022 17:56:14 -0400 Subject: [PATCH] fix(ui): Second shouldn't be plural if value is 1 --- web/app/src/mixins/helper.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/app/src/mixins/helper.js b/web/app/src/mixins/helper.js index dd14035b..1f74b33c 100644 --- a/web/app/src/mixins/helper.js +++ b/web/app/src/mixins/helper.js @@ -14,7 +14,8 @@ export const helper = { let minutes = (differenceInMs / 60000).toFixed(0); return minutes + " minute" + (minutes !== "1" ? "s" : "") + " ago"; } - return (differenceInMs / 1000).toFixed(0) + " seconds ago"; + let seconds = (differenceInMs / 1000).toFixed(0); + return seconds + " second" + (seconds !== "1" ? "s" : "") + " ago"; }, prettifyTimestamp(timestamp) { let date = new Date(timestamp);