]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Convert only finite numbers
authormoisseev <moiseev@mezonplus.ru>
Thu, 13 Aug 2020 17:35:39 +0000 (20:35 +0300)
committermoisseev <moiseev@mezonplus.ru>
Thu, 13 Aug 2020 17:35:39 +0000 (20:35 +0300)
interface/js/app/stats.js

index ea1919af514d65aa953eabb47ea5e7efc4c79d77..dd89879a69a7be94023ae269554e5ba0e0d8efc0 100644 (file)
@@ -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