community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1864072 - in /comdev/reporter.apache.org/trunk/site/wizard/js: source/generators.js wizard.js
Date Wed, 31 Jul 2019 14:54:06 GMT
Author: humbedooh
Date: Wed Jul 31 14:54:05 2019
New Revision: 1864072

URL: http://svn.apache.org/viewvc?rev=1864072&view=rev
Log:
check for finite

Modified:
    comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js
    comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js

Modified: comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js?rev=1864072&r1=1864071&r2=1864072&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js Wed Jul 31 14:54:05
2019
@@ -99,7 +99,7 @@ function health_tips(data) {
         ml = "%s@%s.apache.org".format(a[1], a[0]);
         let pct_change =Math.floor( 100 * ( (mldata.quarterly[0] - mldata.quarterly[1]) /
(mldata.quarterly[1]*1.0) ));
         let pct_change_txt = "%u%".format(pct_change);
-        if (isNaN(pct_change)) {
+        if (isNaN(pct_change) || !isFinite(pct_change)) {
             pct_change_txt = 'big';
         }
         if (pct_change > 25 && mldata.quarterly[0] > 5) {

Modified: comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js?rev=1864072&r1=1864071&r2=1864072&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js Wed Jul 31 14:54:05 2019
@@ -1087,7 +1087,7 @@ function health_tips(data) {
         ml = "%s@%s.apache.org".format(a[1], a[0]);
         let pct_change =Math.floor( 100 * ( (mldata.quarterly[0] - mldata.quarterly[1]) /
(mldata.quarterly[1]*1.0) ));
         let pct_change_txt = "%u%".format(pct_change);
-        if (isNaN(pct_change)) {
+        if (isNaN(pct_change) || !isFinite(pct_change)) {
             pct_change_txt = 'big';
         }
         if (pct_change > 25 && mldata.quarterly[0] > 5) {



Mime
View raw message