diff --git a/frontend/search/components/util/notEmpty.ts b/frontend/search/components/util/notEmpty.ts index 620fcf7..34933b4 100644 --- a/frontend/search/components/util/notEmpty.ts +++ b/frontend/search/components/util/notEmpty.ts @@ -3,6 +3,8 @@ * https://stackoverflow.com/a/46700791/2726641 * @param value */ -export default (value: TValue | null | undefined): value is TValue => !(value === null || value === undefined) +const isUndefOrEmpty = (value: TValue | null | undefined): value is TValue => !(value === null || value === undefined) export const filterUndefOrNull = (ts?: (T | undefined | null)[] | null): T[] => ts?.filter((t: T | undefined | null): t is T => t !== undefined && t !== null) || [] + +export default isUndefOrEmpty