1
0
mirror of https://github.com/fspc/Yellow-Bike-Database.git synced 2025-02-22 17:03:22 -05:00

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

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;
} }
}); });