fix(useDynamicData): throw error when dependency is undefined

This commit is contained in:
Ali BARIN
2022-10-19 22:56:52 +02:00
parent f3f4ea5b60
commit 91ec19c7df
+1 -1
View File
@@ -20,7 +20,7 @@ function computeArguments(args: IFieldDropdownSource["arguments"], getValues: Us
const sanitizedFieldPath = value.replace(/{|}/g, '');
const computedValue = getValues(sanitizedFieldPath);
if (!computedValue) throw new Error(`The ${sanitizedFieldPath} field is required.`);
if (computedValue === undefined) throw new Error(`The ${sanitizedFieldPath} field is required.`);
set(result, name, computedValue);