mirror of https://github.com/Lissy93/dashy.git
🐛 Correct DeepScan issue.
This commit is contained in:
parent
7280820ba5
commit
f46bcc2edd
|
@ -153,7 +153,7 @@ export const getTimeDifference = (startTime, endTime) => {
|
||||||
];
|
];
|
||||||
|
|
||||||
for (let idx = 0; idx < periods.length; idx += 1) {
|
for (let idx = 0; idx < periods.length; idx += 1) {
|
||||||
if (diff < periods[idx + 1]?.value ?? Infinity) {
|
if (diff < (periods[idx + 1]?.value ?? Infinity)) {
|
||||||
const period = periods[idx];
|
const period = periods[idx];
|
||||||
const value = divide(diff, period.value);
|
const value = divide(diff, period.value);
|
||||||
const noun = value === 1 ? period.noun : `${period.noun}s`;
|
const noun = value === 1 ? period.noun : `${period.noun}s`;
|
||||||
|
|
Loading…
Reference in New Issue