From 72cfb5c9ba067771baabf911447651e3472af86f Mon Sep 17 00:00:00 2001 From: William Harvey Date: Wed, 31 Oct 2018 13:17:16 -0400 Subject: [PATCH] Update tables.js Removed the possibility for a division by zero error. --- tables.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tables.js b/tables.js index 6f44d2d..63d877b 100644 --- a/tables.js +++ b/tables.js @@ -72,7 +72,7 @@ $(document).ready(function() { //Highlights classes that are nearing capacity "createdRow": function( row, data, dataIndex ) { var percentFull = Number(data[7])/(Number(data[6])); - if (percentFull >= 1){ + if (percentFull >= 1 || Number(data[6]) == 0){ $(row).addClass('red'); } else if ((percentFull) >=.75) {