PR feedback. Switch single user init back to expect an array and take the result
This commit is contained in:
parent
5ccbec9668
commit
bd2664218c
|
@ -25,10 +25,11 @@
|
||||||
const linkedIds = (Array.isArray(val) ? val : [])?.map(
|
const linkedIds = (Array.isArray(val) ? val : [])?.map(
|
||||||
row => row?._id || row
|
row => row?._id || row
|
||||||
)
|
)
|
||||||
if (schema.relationshipType === "one-to-many") {
|
if (
|
||||||
return linkedIds?.[0]
|
schema.relationshipType === "one-to-many" ||
|
||||||
} else if (schema.type === "bb_reference_single") {
|
schema.type === "bb_reference_single"
|
||||||
return val
|
) {
|
||||||
|
return linkedIds[0]
|
||||||
} else {
|
} else {
|
||||||
return linkedIds
|
return linkedIds
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue