Koha: Fix crash with empty selection boxes
@@ -180,7 +180,9 @@ open class Koha : OkHttpBaseApi() {
// filter fields
val fieldsets = doc.select("#advsearches fieldset")
val tabs = doc.select("#advsearches > ul > li")
- val filterFields = fieldsets.zip(tabs).map { (fieldset, tab) ->
+ val filterFields = fieldsets.zip(tabs).filter { (fieldset, tab) ->
+ fieldset.select("input[type=checkbox]").isNotEmpty()
+ }.map { (fieldset, tab) ->
val title = tab.text.trim()
val checkboxes = fieldset.select("input[type=checkbox]")
DropdownSearchField().apply {
