Skip to content
Snippets Groups Projects
Commit 218afe0b authored by Demian Katz's avatar Demian Katz
Browse files

Merge branch 'release-3.1'

parents 699c34ac bfa293b2
No related merge requests found
...@@ -24,7 +24,8 @@ function setUpHoldRequestForm(recordId) { ...@@ -24,7 +24,8 @@ function setUpHoldRequestForm(recordId) {
var defaultValue = $('#pickUpLocation').data('default'); var defaultValue = $('#pickUpLocation').data('default');
$.each(response.data.locations, function holdPickupLocationEach() { $.each(response.data.locations, function holdPickupLocationEach() {
var option = $('<option></option>').attr('value', this.locationID).text(this.locationDisplay); var option = $('<option></option>').attr('value', this.locationID).text(this.locationDisplay);
if (this.locationID === defaultValue || (defaultValue === '' && this.isDefault && $emptyOption.length === 0)) { // Weak comparison between locationID and defaultValue since locationID may be an integer
if (this.locationID == defaultValue || (defaultValue === '' && this.isDefault && $emptyOption.length === 0)) {
option.attr('selected', 'selected'); option.attr('selected', 'selected');
} }
$('#pickUpLocation').append(option); $('#pickUpLocation').append(option);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment