Handle empty arrays too.
This commit is contained in:
parent
ca0dc030ad
commit
9ebd890c04
|
@ -135,17 +135,19 @@ export function isSupportedUserSearch(query: SearchFilters) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
export function processSearchFilters(filterArray: undefined): undefined
|
export function processSearchFilters(filterArray: undefined): undefined
|
||||||
|
export function processSearchFilters(filterArray: []): undefined
|
||||||
export function processSearchFilters(
|
export function processSearchFilters(
|
||||||
filterArray: LegacyFilter[]
|
filterArray: LegacyFilter[]
|
||||||
): Required<UISearchFilter>
|
): Required<UISearchFilter>
|
||||||
export function processSearchFilters(
|
export function processSearchFilters(
|
||||||
filterArray?: LegacyFilter[]
|
filterArray?: LegacyFilter[]
|
||||||
): Required<UISearchFilter> | undefined {
|
): Required<UISearchFilter> | undefined {
|
||||||
if (!filterArray) {
|
if (!filterArray || filterArray.length === 0) {
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
const { allOr, onEmptyFilter, filters } = splitFiltersArray(filterArray)
|
const { allOr, onEmptyFilter, filters } = splitFiltersArray(filterArray)
|
||||||
|
|
Loading…
Reference in New Issue