This commit is contained in:
Adria Navarro 2023-09-18 12:07:14 +02:00
parent d0197730d5
commit 108728ee15
1 changed files with 45 additions and 44 deletions

View File

@ -346,14 +346,15 @@
}
function getRelationshipOptions(field) {
switch (field.type) {
case FieldType.LINK:
if (!field || !field.tableId) {
if (!field) {
return null
}
const linkTable = tableOptions?.find(
table => table._id === field.tableId
)
if (field.type === FieldType.LINK) {
if (!field.tableId) {
return null
}
const linkTable = tableOptions?.find(table => table._id === field.tableId)
if (!linkTable) {
return null
}
@ -376,7 +377,7 @@
value: RelationshipType.MANY_TO_ONE,
},
]
case BB_USER_REFERENCE_TYPE:
} else if (field.type === BB_USER_REFERENCE_TYPE) {
return [
{
name: `Single user`,
@ -389,7 +390,7 @@
value: RelationshipType.MANY_TO_ONE,
},
]
default:
} else {
return null
}
}