Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

Commit

Permalink
fix(ui): time ago not trying last unit
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Jan 1, 2022
1 parent 9c8ca92 commit ae60faf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/peeky-client/src/features/TimeAgo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function update () {
let diff = (parsedDate.value.getTime() - Date.now()) / 1000
let unit: Intl.RelativeTimeFormatUnit = 'second'
let newInterval = 1000
for (let index = 0; index < units.length - 1; index++) {
for (let index = 0; index < units.length; index++) {
const newDiff = diff / units[index][0]
if (Math.abs(newDiff) < 1) {
index--
Expand Down

0 comments on commit ae60faf

Please sign in to comment.