From 8396b66a76ee50d4a0ded3bbae020ed72a16a121 Mon Sep 17 00:00:00 2001 From: Jonathan Rosenbaum Date: Tue, 31 Oct 2017 07:54:34 +0000 Subject: [PATCH] Corrects a bug where comparisons req. Number cast. --- js/reports.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/reports.js b/js/reports.js index ce09edf..7113e3c 100644 --- a/js/reports.js +++ b/js/reports.js @@ -24,10 +24,10 @@ $(function(){ $.post("json/reports.php", { total: 1 }, function (data) { var obj = $.parseJSON(data); - if (contact_id > obj.total) { + if (Number(contact_id) > Number(obj.total)) { prev = obj.total; next = obj.total; - } else if (contact_id === obj.total) { + } else if (Number(contact_id) === Number(obj.total)) { next = obj.total; } });