Return always arrays for bb processor fields
This commit is contained in:
parent
60d94e76cf
commit
7f6ef551c9
2 changed files with 2 additions and 6 deletions
|
@ -67,9 +67,5 @@ export async function processOutputBBReferences(
|
||||||
throw utils.unreachable(subtype)
|
throw utils.unreachable(subtype)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result.length > 1) {
|
return result
|
||||||
return result
|
|
||||||
}
|
|
||||||
|
|
||||||
return result[0]
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -145,7 +145,7 @@ describe("bbReferenceProcessor", () => {
|
||||||
FieldSubtype.USER
|
FieldSubtype.USER
|
||||||
)
|
)
|
||||||
|
|
||||||
expect(result).toEqual(userFromCache)
|
expect(result).toEqual([userFromCache])
|
||||||
expect(mockedCacheGetUser).toBeCalledTimes(1)
|
expect(mockedCacheGetUser).toBeCalledTimes(1)
|
||||||
expect(mockedCacheGetUser).toBeCalledWith(userId)
|
expect(mockedCacheGetUser).toBeCalledWith(userId)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue