From df13cbb5240f85d75603f2442f71bcac965eb620 Mon Sep 17 00:00:00 2001 From: Remy Gouello Date: Sat, 30 Dec 2023 15:36:17 +0100 Subject: [PATCH] fix(typo): fix enitityMetadata typo --- lib/typeorm.providers.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/typeorm.providers.ts b/lib/typeorm.providers.ts index 6876bb02e..7f174ee78 100644 --- a/lib/typeorm.providers.ts +++ b/lib/typeorm.providers.ts @@ -10,8 +10,8 @@ export function createTypeOrmProviders( return (entities || []).map((entity) => ({ provide: getRepositoryToken(entity, dataSource), useFactory: (dataSource: DataSource) => { - const enitityMetadata = dataSource.entityMetadatas.find((meta) => meta.target === entity) - const isTreeEntity = typeof enitityMetadata?.treeType !== 'undefined' + const entityMetadata = dataSource.entityMetadatas.find((meta) => meta.target === entity) + const isTreeEntity = typeof entityMetadata?.treeType !== 'undefined' return isTreeEntity ? dataSource.getTreeRepository(entity) : dataSource.options.type === 'mongodb'