From 5e2d48b8e3ad8116feec325f3819651fa91b72ee Mon Sep 17 00:00:00 2001 From: Andrey Platov Date: Sun, 10 Oct 2021 15:20:20 +0200 Subject: [PATCH] null check in mongo driver Signed-off-by: Andrey Platov --- server/mongo/src/storage.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/mongo/src/storage.ts b/server/mongo/src/storage.ts index 6e7b77c21e..5d1f35157c 100644 --- a/server/mongo/src/storage.ts +++ b/server/mongo/src/storage.ts @@ -38,7 +38,7 @@ abstract class MongoAdapterBase extends TxProcessor { const translated: any = {} for (const key in query) { const value = (query as any)[key] - if (typeof value === 'object') { + if (value !== null && typeof value === 'object') { const keys = Object.keys(value) if (keys[0] === '$like') { const pattern = value.$like as string