diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-04-22 10:16:54 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-04-22 10:16:54 +1200 |
commit | 78c121fcb45c5fe5a6509c90898811d7e9d7a253 (patch) | |
tree | a322f1888de9fffc9670ce6c67376a6f9669819b /web/app/view/edit/Devices.js | |
parent | 9a4bd28bec0cdb05a39e1f66be7df7a287f98a80 (diff) | |
download | trackermap-web-78c121fcb45c5fe5a6509c90898811d7e9d7a253.tar.gz trackermap-web-78c121fcb45c5fe5a6509c90898811d7e9d7a253.tar.bz2 trackermap-web-78c121fcb45c5fe5a6509c90898811d7e9d7a253.zip |
Avoid negative last update (fix #475)
Diffstat (limited to 'web/app/view/edit/Devices.js')
-rw-r--r-- | web/app/view/edit/Devices.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/web/app/view/edit/Devices.js b/web/app/view/edit/Devices.js index 7c1f9358..b5b6badd 100644 --- a/web/app/view/edit/Devices.js +++ b/web/app/view/edit/Devices.js @@ -163,6 +163,9 @@ Ext.define('Traccar.view.edit.Devices', { if (value) { seconds = Math.floor((new Date() - value) / 1000); + if (seconds < 0) { + seconds = 0; + } interval = Math.floor(seconds / 86400); if (interval > 1) { return interval + ' ' + Strings.sharedDays; |