Skip to content

Commit

Permalink
Fix incorrect use of parseInt()
Browse files Browse the repository at this point in the history
  • Loading branch information
campbell-m committed May 29, 2024
1 parent d279019 commit 01d770e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/js/refresh.js.php
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ function getIndices(slots, time) {
{
<?php // The delay is half the slot length in seconds divided by the slot width/height in pixels ?>
delay = (slot[1] - slot[0])/(2 * slotSize);
delay = parseInt(delay * 1000, 10); <?php // Convert to milliseconds ?>
delay = Math.round(delay * 1000); <?php // Convert to milliseconds ?>
delay = Math.max(delay, 1000);
}
<?php // If we still haven't got one, or else it's zero, then set a sensible default delay ?>
Expand Down

0 comments on commit 01d770e

Please sign in to comment.