Corrects a bug where comparisons req. Number cast.

This commit is contained in:
Jonathan Rosenbaum
2017-10-31 07:54:34 +00:00
parent bc3c7450fd
commit 8396b66a76
+2 -2
View File
@@ -24,10 +24,10 @@ $(function(){
$.post("json/reports.php", { total: 1 }, function (data) { $.post("json/reports.php", { total: 1 }, function (data) {
var obj = $.parseJSON(data); var obj = $.parseJSON(data);
if (contact_id > obj.total) { if (Number(contact_id) > Number(obj.total)) {
prev = obj.total; prev = obj.total;
next = obj.total; next = obj.total;
} else if (contact_id === obj.total) { } else if (Number(contact_id) === Number(obj.total)) {
next = obj.total; next = obj.total;
} }
}); });