Browse Source

Avoids unnecessary error, related to #56.

devel
Jonathan Rosenbaum 7 years ago
parent
commit
b08a2387a0
  1. 8
      js/transaction.js

8
js/transaction.js

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

Loading…
Cancel
Save