Make sure processSearchFilters handles an undefined input.
This commit is contained in:
parent
ad475be4f7
commit
ca0dc030ad
|
@ -138,9 +138,16 @@ export function isSupportedUserSearch(query: SearchFilters) {
|
|||
return true
|
||||
}
|
||||
|
||||
export const processSearchFilters = (
|
||||
export function processSearchFilters(filterArray: undefined): undefined
|
||||
export function processSearchFilters(
|
||||
filterArray: LegacyFilter[]
|
||||
): Required<UISearchFilter> => {
|
||||
): Required<UISearchFilter>
|
||||
export function processSearchFilters(
|
||||
filterArray?: LegacyFilter[]
|
||||
): Required<UISearchFilter> | undefined {
|
||||
if (!filterArray) {
|
||||
return undefined
|
||||
}
|
||||
const { allOr, onEmptyFilter, filters } = splitFiltersArray(filterArray)
|
||||
return {
|
||||
logicalOperator: UILogicalOperator.ALL,
|
||||
|
|
Loading…
Reference in New Issue