Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
fangzhipeng committed Aug 22, 2020
1 parent 11716ce commit cf7bd2f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/typeorm.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class TypeOrmModule {
| string = DEFAULT_CONNECTION_NAME,
): DynamicModule {
const providers = createTypeOrmProviders(entities, connection);
let repEntities = [];
let customRepositoryEntities = [];
for (let entity of entities) {
if (
entity instanceof Function &&
Expand All @@ -55,14 +55,14 @@ export class TypeOrmModule {
if (
entities.indexOf(<any>entityRepositoryMetadataArgs.entity) === -1
) {
repEntities.push(entityRepositoryMetadataArgs.entity);
customRepositoryEntities.push(entityRepositoryMetadataArgs.entity);
}
}
}
}
EntitiesMetadataStorage.addEntitiesByConnection(connection, [
...entities,
...repEntities,
...customRepositoryEntities,
]);
return {
module: TypeOrmModule,
Expand Down

0 comments on commit cf7bd2f

Please sign in to comment.