diff --git a/src/api/endpoints/class-tainacan-rest-filters-controller.php b/src/api/endpoints/class-tainacan-rest-filters-controller.php index c1e9d168c..7a93f4c13 100644 --- a/src/api/endpoints/class-tainacan-rest-filters-controller.php +++ b/src/api/endpoints/class-tainacan-rest-filters-controller.php @@ -327,7 +327,7 @@ class REST_Filters_Controller extends REST_Controller { $item_arr['enabled'] = $item->get_enabled_for_collection(); } - $item_arr['filter_type_object'] = $item->get_filter_type_object()->_toArray(); + $item_arr['filter_type_object'] = $item->get_filter_type_object() ? $item->get_filter_type_object()->_toArray() : $item->get_filter_type_object(); return $item_arr; } diff --git a/src/classes/filter-types/custom-interval/CustomInterval.vue b/src/classes/filter-types/custom-interval/CustomInterval.vue index 4b08e2ef3..2ebbf6999 100644 --- a/src/classes/filter-types/custom-interval/CustomInterval.vue +++ b/src/classes/filter-types/custom-interval/CustomInterval.vue @@ -4,7 +4,7 @@