Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
Small change to previousTimestamp() in preprocess.js
Browse files Browse the repository at this point in the history
  • Loading branch information
lowkw committed Jun 18, 2024
1 parent 9fe2019 commit 8d2e541
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/static/js/preprocess.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ function previousTimestamp() {
let closestDiff = Infinity;

timestampsArr.forEach(ts => {
if (ts.seconds < currentTime) {
const difference = Math.abs(currentTime - ts.seconds);
if (Math.floor(ts.seconds) < Math.floor(currentTime)) {
const difference = Math.abs(Math.floor(currentTime) - Math.floor(ts.seconds));
if (difference < closestDiff) {
closestDiff = difference;
closest = ts;
Expand Down

0 comments on commit 8d2e541

Please sign in to comment.