From bce3b1d5629e4cfe26a6bb1070c4dae12c787a78 Mon Sep 17 00:00:00 2001 From: Brad Campbell Date: Fri, 27 May 2016 01:00:35 -0400 Subject: [PATCH] fix issue with NAN for people in debt --- chezbetty/static/js/chezbetty-terminal.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chezbetty/static/js/chezbetty-terminal.js b/chezbetty/static/js/chezbetty-terminal.js index afd8be1..1fd97ad 100644 --- a/chezbetty/static/js/chezbetty-terminal.js +++ b/chezbetty/static/js/chezbetty-terminal.js @@ -289,7 +289,9 @@ function calculate_wallofshame_fee_percent (balance, total) { } } - fee_percent = (fee / total) * 100; + if (total > 0) { + fee_percent = (fee / total) * 100; + } if (fee_percent < 0.1) { fee_percent = 0.1;