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

Avoids unnecessary error, related to #56.

This commit is contained in:
Jonathan Rosenbaum 2018-01-02 06:54:26 +00:00
parent 8ffb51e20a
commit b08a2387a0

View File

@ -1303,9 +1303,11 @@ $(function() {
// more than max_bike_limit turn off spinner
if ($("#transaction_type").val() === "Bicycles") {
if (volunteer && obj.max_bike_earned) {
if (volunteer[year].max_bike_earned >= obj.max_bike_earned) {
$("#redeemable_hours").spinner("disable");
if (volunteer && obj.max_bike_earned) {
if (volunteer.hasOwnProperty(year)) {
if (volunteer[year].max_bike_earned >= obj.max_bike_earned) {
$("#redeemable_hours").spinner("disable");
}
}
}
}