fix(useDynamicData): throw error when dependency is undefined
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user