Return always arrays for bb processor fields

This commit is contained in:
Adria Navarro 2023-09-15 17:34:59 +02:00
parent 60d94e76cf
commit 7f6ef551c9
2 changed files with 2 additions and 6 deletions

View File

@ -67,9 +67,5 @@ export async function processOutputBBReferences(
throw utils.unreachable(subtype)
}
if (result.length > 1) {
return result
}
return result[0]
return result
}

View File

@ -145,7 +145,7 @@ describe("bbReferenceProcessor", () => {
FieldSubtype.USER
)
expect(result).toEqual(userFromCache)
expect(result).toEqual([userFromCache])
expect(mockedCacheGetUser).toBeCalledTimes(1)
expect(mockedCacheGetUser).toBeCalledWith(userId)
})