diff --git a/packages/shared-core/src/utils.ts b/packages/shared-core/src/utils.ts index 5db4ead1dc..8e22c10c15 100644 --- a/packages/shared-core/src/utils.ts +++ b/packages/shared-core/src/utils.ts @@ -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 => { +): Required +export function processSearchFilters( + filterArray?: LegacyFilter[] +): Required | undefined { + if (!filterArray) { + return undefined + } const { allOr, onEmptyFilter, filters } = splitFiltersArray(filterArray) return { logicalOperator: UILogicalOperator.ALL,