Skip to content

Commit

Permalink
fix(typo): fix enitityMetadata typo
Browse files Browse the repository at this point in the history
  • Loading branch information
KinderGouello authored Dec 30, 2023
1 parent 7816847 commit df13cbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/typeorm.providers.ts
Original file line number Diff line number Diff line change
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 df13cbb

Please sign in to comment.