null check in mongo driver

Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
Andrey Platov 2021-10-10 15:20:20 +02:00
parent 3c69fa7d11
commit 5e2d48b8e3
No known key found for this signature in database
GPG Key ID: C8787EFEB4B64AF0

View File

@ -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