Commit 0770b448 authored by vilepickle's avatar vilepickle Committed by Mike Keran
Browse files

Issue #2558757 by vilepickle: Javascript error if Views Selective Filter...

Issue #2558757 by vilepickle: Javascript error if Views Selective Filter module removes all checkboxes
parent eaf86890
......@@ -359,9 +359,12 @@
}
});
var $filter_name = $('input', this).attr('name').slice(0, -2);
if (Drupal.settings.better_exposed_filters.views[$view_name].displays[$view_display_id].filters[$filter_name].required && $('input:checked', this).length == 0) {
$('input', this).prop('checked', true);
//Check if we have any filters at all because of Views Selective Filter
if($('input', this).length > 0) {
var $filter_name = $('input', this).attr('name').slice(0, -2);
if (Drupal.settings.better_exposed_filters.views[$view_name].displays[$view_display_id].filters[$filter_name].required && $('input:checked', this).length == 0) {
$('input', this).prop('checked', true);
}
}
});
}
......
Supports Markdown
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