Fixing an issue uncovered by tests, MS-SQL and MariaDB when columns are aliased don't always return an array, they may return a stringified version. Making the reference processor more hardy against this.
This commit is contained in:
parent
e0805f7056
commit
4efec72b4d
|
@ -68,8 +68,16 @@ export async function processOutputBBReferences(
|
|||
return value || undefined
|
||||
}
|
||||
|
||||
const ids =
|
||||
typeof value === "string" ? value.split(",").filter(id => !!id) : value
|
||||
let ids: string[] = []
|
||||
if (typeof value === "string") {
|
||||
try {
|
||||
ids = JSON.parse(value)
|
||||
} catch (err) {
|
||||
ids = value.split(",").filter(id => !!id)
|
||||
}
|
||||
} else if (Array.isArray(value)) {
|
||||
ids = value
|
||||
}
|
||||
|
||||
switch (subtype) {
|
||||
case FieldSubtype.USER:
|
||||
|
|
Loading…
Reference in New Issue