From 1c0cd6b6b0fc342f50b31c5203bebeac1922eb26 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Fri, 2 Apr 2021 15:33:25 +0800 Subject: [PATCH] Remove a stale variable from timeago.js --- assets/js/_utils/timeago.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/js/_utils/timeago.js b/assets/js/_utils/timeago.js index da56b37..b14ea11 100644 --- a/assets/js/_utils/timeago.js +++ b/assets/js/_utils/timeago.js @@ -10,10 +10,10 @@ $(function() { let intervalId = void 0; - function timeago(iso, prepData) { + function timeago(iso, preposition) { let now = new Date(); let past = new Date(iso); - let prep = (typeof prepData !== "undefined" ? `${prepData} ` : ""); + let prep = (typeof preposition !== "undefined" ? `${preposition} ` : ""); if (past.getFullYear() !== now.getFullYear()) { toRefresh -= 1; @@ -50,7 +50,7 @@ $(function() { return minute + " minute" + (minute > 1 ? "s" : "") + " ago"; } - return (isLastmod ? "just" : "Just") + " now"; + return "just now"; } function updateTimeago() {