fix: empty inArray no longer crashes postgres

This commit is contained in:
James
2023-10-15 17:28:13 -04:00
parent 1481ef97b5
commit c4ac341d75
7 changed files with 52 additions and 13 deletions

View File

@@ -796,4 +796,19 @@ describe('Fields', () => {
expect(uploadElement.value.media.filename).toStrictEqual('payload.png')
})
})
describe('relationships', () => {
it('should not crash if querying with empty in operator', async () => {
const query = await payload.find({
collection: 'relationship-fields',
where: {
'relationship.value': {
in: [],
},
},
})
expect(query.docs).toBeDefined()
})
})
})