1
0
Fork 0
mirror of synced 2024-07-21 06:05:52 +12:00

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)
})