Skip to content

Commit

Permalink
Merge pull request #1850 from KinderGouello/fix-entity-typo
Browse files Browse the repository at this point in the history
fix(typo): fix enitityMetadata typo
  • Loading branch information
kamilmysliwiec committed Jan 2, 2024
2 parents 56b25d8 + df13cbb commit ed6cda0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/typeorm.providers.ts
Expand Up @@ -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'
Expand Down

0 comments on commit ed6cda0

Please sign in to comment.