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
|
return value || undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
const ids =
|
let ids: string[] = []
|
||||||
typeof value === "string" ? value.split(",").filter(id => !!id) : value
|
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) {
|
switch (subtype) {
|
||||||
case FieldSubtype.USER:
|
case FieldSubtype.USER:
|
||||||
|
|
Loading…
Reference in New Issue