From d298fcb5ce97a073c9288c831750020a54cb16dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Tue, 21 May 2024 15:37:39 +0200 Subject: [PATCH] fix: do not export `MongoMikroORM` symbol when we fail to infer driver from config Closes #180 --- src/mikro-orm-core.module.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mikro-orm-core.module.ts b/src/mikro-orm-core.module.ts index dc719e3..cdbd8eb 100644 --- a/src/mikro-orm-core.module.ts +++ b/src/mikro-orm-core.module.ts @@ -83,7 +83,7 @@ export class MikroOrmCoreModule implements OnApplicationShutdown { contextName ? getEntityManagerToken(contextName) : EntityManager, ...(em && !contextName ? [em.constructor] : []), ...(knex && !contextName ? [knex.EntityManager] : []), - ...(mongo && !contextName ? [mongo.EntityManager, mongo.MikroORM] : []), + ...(mongo && !contextName ? [mongo.EntityManager] : []), ], }; } @@ -137,7 +137,7 @@ export class MikroOrmCoreModule implements OnApplicationShutdown { contextName ? getEntityManagerToken(contextName) : EntityManager, ...(em && !contextName ? [em.constructor] : []), ...(knex && !contextName ? [knex.EntityManager] : []), - ...(mongo && !contextName ? [mongo.EntityManager, mongo.MikroORM] : []), + ...(mongo && !contextName ? [mongo.EntityManager] : []), ], }; }