1
0
Fork 0
mirror of synced 2024-09-06 12:41:24 +12:00

Value is always csv

This commit is contained in:
Adria Navarro 2023-09-19 13:17:07 +02:00
parent 89af863c34
commit 1314b991c7

View file

@ -45,14 +45,17 @@ export async function processOutputBBReferences(
subtype: FieldSubtype subtype: FieldSubtype
) { ) {
if (typeof value !== "string") { if (typeof value !== "string") {
// Already processed or nothing to process
return value return value
} }
const result = [] const result = []
const validIds = value.split(",").filter(id => !!id)
switch (subtype) { switch (subtype) {
case FieldSubtype.USER: case FieldSubtype.USER:
for (const id of value.split(",").filter(x => !!x)) { for (const id of validIds) {
try { try {
const user = await cache.user.getUser(id) const user = await cache.user.getUser(id)
if (user) { if (user) {