This commit is contained in:
2026-06-13 16:19:40 +05:30
parent cd89eb4c88
commit f2edf7ade7
3 changed files with 12 additions and 3 deletions

View File

@@ -17,6 +17,9 @@ export function getFieldOptions(field: ResourceField, relationData?: any[]): Sel
if (field.relation) {
const data = Array.isArray(relationData) ? relationData : [];
if (data.length === 0) {
throw new Error(`Relation data for "${field.relation}" is missing or empty cannot build options for field "${field.label}"`);
}
const enumOption = field.enumOption;
if (!enumOption) {
throw new Error(