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:
parent
bc3c7450fd
commit
8396b66a76
@ -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;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user