From a2217c28a10e7d04f97d0443486a3078a6e5ed40 Mon Sep 17 00:00:00 2001 From: blam Date: Mon, 22 Aug 2022 11:21:51 +0200 Subject: [PATCH] chore: empty strings are still strings, so if it's not set default to undefined to throw the correct error Signed-off-by: blam --- .../src/components/fields/EntityPicker/EntityPicker.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/scaffolder/src/components/fields/EntityPicker/EntityPicker.tsx b/plugins/scaffolder/src/components/fields/EntityPicker/EntityPicker.tsx index b7e3122c31..2aa72550c3 100644 --- a/plugins/scaffolder/src/components/fields/EntityPicker/EntityPicker.tsx +++ b/plugins/scaffolder/src/components/fields/EntityPicker/EntityPicker.tsx @@ -72,7 +72,7 @@ export const EntityPicker = ( const onSelect = useCallback( (_: any, value: string | null) => { - onChange(value || ''); + onChange(value ?? undefined); }, [onChange], );