mirror of
https://github.com/fspc/Yellow-Bike-Database.git
synced 2025-02-22 00:53:22 -05:00
Partial fix for #56.
This commit is contained in:
parent
68e835d74b
commit
c69181048f
@ -143,9 +143,11 @@ $(function(){
|
||||
var volunteer = "", remaining = 0, vhr = "", max_bikes_earned = 0;
|
||||
if (obj.volunteer) {
|
||||
volunteer = $.parseJSON(obj.volunteer);
|
||||
remaining = obj.current_year_volunteer_hours - volunteer[year].volunteer_hours_redeemed;
|
||||
vhr = volunteer[year].volunteer_hours_redeemed;
|
||||
max_bikes_earned = volunteer[year].max_bike_earned;
|
||||
if (volunteer.hasOwnProperty(year)) {
|
||||
remaining = obj.current_year_volunteer_hours - volunteer[year].volunteer_hours_redeemed;
|
||||
vhr = volunteer[year].volunteer_hours_redeemed;
|
||||
max_bikes_earned = volunteer[year].max_bike_earned;
|
||||
}
|
||||
} else {
|
||||
vhr = 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user