diff options
author | Anton Tananaev <anton@traccar.org> | 2024-03-23 08:28:56 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2024-03-23 08:28:56 -0700 |
commit | 4e513a811f1c6461d1decfbd52d19e2bf9f7b2ba (patch) | |
tree | ab63efaa519f485b728994e7d0b9b9d9edca8dc4 /modern/src/settings/MaintenancePage.jsx | |
parent | 399e0585d72bace51a0c81e9f889dda054e68519 (diff) | |
download | trackermap-web-4e513a811f1c6461d1decfbd52d19e2bf9f7b2ba.tar.gz trackermap-web-4e513a811f1c6461d1decfbd52d19e2bf9f7b2ba.tar.bz2 trackermap-web-4e513a811f1c6461d1decfbd52d19e2bf9f7b2ba.zip |
Fix lint issues
Diffstat (limited to 'modern/src/settings/MaintenancePage.jsx')
-rw-r--r-- | modern/src/settings/MaintenancePage.jsx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/modern/src/settings/MaintenancePage.jsx b/modern/src/settings/MaintenancePage.jsx index 87f8ea0b..2161e7eb 100644 --- a/modern/src/settings/MaintenancePage.jsx +++ b/modern/src/settings/MaintenancePage.jsx @@ -73,10 +73,10 @@ const MaintenancePage = () => { if (item.type.endsWith('Time')) { if (start) { return dayjs(value).locale('en').format('YYYY-MM-DD'); - } else { - return value / 86400000; } - } else if (attribute && attribute.dataType) { + return value / 86400000; + } + if (attribute && attribute.dataType) { switch (attribute.dataType) { case 'speed': return speedFromKnots(value, speedUnit); @@ -94,10 +94,9 @@ const MaintenancePage = () => { if (item.type.endsWith('Time')) { if (start) { return dayjs(value, 'YYYY-MM-DD').valueOf(); - } else { - return value * 86400000; } - } else if (attribute && attribute.dataType) { + return value * 86400000; + } if (attribute && attribute.dataType) { switch (attribute.dataType) { case 'speed': return speedToKnots(value, speedUnit); |