Skip to content

Commit

Permalink
Merge pull request #8345 from braze-inc/partner-fix-empty-specialities
Browse files Browse the repository at this point in the history
Fix issue with partner select
  • Loading branch information
josh-mccrowell-braze authored Oct 31, 2024
2 parents bd08f8c + 6ef56a3 commit 21425e0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions _layouts/partner_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
}
}

var card_speciality = $('<h6>').html((cur_partner['partner_specialties'] || []).join(' '));
var card_speciality = cur_partner['partner_specialties'] ? $('<h6>').html((cur_partner['partner_specialties'] || []).join(' ')) : null;
var card_content = $('<div>').addClass('hover_content').append($('<p>').html(cur_partner['partner_description']));

var card_div = $('<div>').addClass('content').append(card_img).append(card_title).append(card_speciality).append(card_content);
Expand Down Expand Up @@ -200,10 +200,10 @@
var toappend = true;
var filtered = true;
for (var k = 0 ; k < filter_select.length; k++ ) {
var selected_val = $('#' + filter_select[k] + " option:selected").val();
var selected_val = $('#' + filter_select[k] + " option:selected").val();
if (selected_val) {
toappend = false;
if (cur_partner[filter_map[k]].indexOf(selected_val) < 0 ) {
if ((cur_partner[filter_map[k]] || []).indexOf(selected_val) < 0 ) {
filtered = false;
}
}
Expand Down

0 comments on commit 21425e0

Please sign in to comment.