From 3aca0c0ed33e4481dc5b1a8e11c3c89e16a7fbd7 Mon Sep 17 00:00:00 2001 From: melohagan <101575380+melohagan@users.noreply.github.com> Date: Fri, 23 Jun 2023 14:48:07 +0100 Subject: [PATCH] Null safety (#11007) --- packages/server/src/integrations/mongodb.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/integrations/mongodb.ts b/packages/server/src/integrations/mongodb.ts index 417aa61f41..3f05dca954 100644 --- a/packages/server/src/integrations/mongodb.ts +++ b/packages/server/src/integrations/mongodb.ts @@ -383,7 +383,7 @@ class MongoIntegration implements IntegrationBase { createObjectIds(json: any): object { const self = this function interpolateObjectIds(json: any) { - for (let field of Object.keys(json)) { + for (let field of Object.keys(json || {})) { if (json[field] instanceof Object) { json[field] = self.createObjectIds(json[field]) }