commit 042053e: [Minor] Convert only finite numbers

moisseev moiseev at mezonplus.ru
Fri Aug 14 17:14:06 UTC 2020


Author: moisseev
Date: 2020-08-13 20:35:39 +0300
URL: https://github.com/rspamd/rspamd/commit/042053e472148ac7789843d9e720cedcbc717655

[Minor] Convert only finite numbers

---
 interface/js/app/stats.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/interface/js/app/stats.js b/interface/js/app/stats.js
index ea1919af5..dd89879a6 100644
--- a/interface/js/app/stats.js
+++ b/interface/js/app/stats.js
@@ -29,6 +29,7 @@ define(["jquery", "d3pie"],
         "use strict";
         // @ ms to date
         function msToTime(seconds) {
+            if (!Number.isFinite(seconds)) return "???";
             /* eslint-disable no-bitwise */
             var years = seconds / 31536000 >> 0; // 3600*24*365
             var months = seconds % 31536000 / 2628000 >> 0; // 3600*24*365/12


More information about the Commits mailing list