From 83b6d1710f89c00b33171e6f6ec6f928edace78b Mon Sep 17 00:00:00 2001 From: winzlieb Date: Thu, 17 Mar 2022 14:46:33 +0100 Subject: [PATCH] eliminate warning --- frontend/search/components/util/notEmpty.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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