This commit is contained in:
Adria Navarro 2023-09-22 17:33:13 +02:00
parent 8a5270c6ee
commit 38d6fa8b2a
1 changed files with 5 additions and 1 deletions

View File

@ -10,7 +10,11 @@ export async function processInputBBReferences(
const referenceIds: string[] = []
if (Array.isArray(value)) {
referenceIds.push(...value.map(x => (typeof x === "string" ? x : x._id)))
referenceIds.push(
...value.map(idOrDoc =>
typeof idOrDoc === "string" ? idOrDoc : idOrDoc._id
)
)
} else if (typeof value !== "string") {
referenceIds.push(value._id)
} else {