fix: convert to str than filter

prevent empty strings from getting passed to mongodb
https://github.com/NodeBB/NodeBB/issues/13007#issuecomment-2560503754
This commit is contained in:
Barış Soner Uşaklı
2024-12-23 20:29:42 -05:00
parent e71feeec1f
commit c69fa811e5
2 changed files with 2 additions and 2 deletions

View File

@@ -521,6 +521,7 @@ describe('Hash methods', () => {
it('should not error if fields is empty array', async () => {
await db.deleteObjectFields('someKey', []);
await db.deleteObjectField('someKey', []);
});
it('should not error if key is undefined', (done) => {