Skip to content

Commit

Permalink
arrays for checkboxes, fixes #367
Browse files Browse the repository at this point in the history
  • Loading branch information
peterstadler committed Nov 23, 2020
1 parent 79fe350 commit 2de2d75
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion resources/js/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,10 @@ function active_facets() {
$('.allFilter:visible :checked').each(function() {
var facet = $(this).attr('name'),
value = $(this).attr('value')? $(this).attr('value'): 'true';
if(undefined != facet) { params.facets[facet] = value }
if(undefined != facet) {
if(params.facets[facet] === undefined) { params.facets[facet] = [] }
params.facets[facet].push(value);
}
})
if($('.query-input').val()) {
params.facets.q = $('.query-input').val();
Expand Down

0 comments on commit 2de2d75

Please sign in to comment.