Skip to content

Commit

Permalink
Guard again undefined criteria. Addresses #32
Browse files Browse the repository at this point in the history
  • Loading branch information
jindrichmynarz committed Aug 27, 2014
1 parent cfc8a78 commit b7dd6a9
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/main/webapp/buyer-view-event.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -468,12 +468,14 @@
field.closest(".control-group").addClass('hide');
}
if (data.criteria.LowestPrice)
$("#inputECPrice").html(data.criteria.LowestPrice);
if (data.criteria.TechnicalQuality)
$("#inputECTech").html(data.criteria.TechnicalQuality);
if (data.criteria.BestDate)
if (typeof data.criteria !== "undefined") {
if (data.criteria.LowestPrice)
$("#inputECPrice").html(data.criteria.LowestPrice);
if (data.criteria.TechnicalQuality)
$("#inputECTech").html(data.criteria.TechnicalQuality);
if (data.criteria.BestDate)
$("#inputECDate").html(data.criteria.BestDate);
}
//$("#btn"+data.eventType).click();
Expand Down

0 comments on commit b7dd6a9

Please sign in to comment.