Skip to content

Commit

Permalink
refactor(): move isAlias check to filter function
Browse files Browse the repository at this point in the history
  • Loading branch information
matt1097 committed Aug 11, 2022
1 parent a440dfc commit ce045e7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/event-subscribers.loader.ts
Expand Up @@ -45,11 +45,8 @@ export class EventSubscribersLoader
const providers = this.discoveryService.getProviders();
const controllers = this.discoveryService.getControllers();
[...providers, ...controllers]
.filter(wrapper => wrapper.instance)
.filter(wrapper => wrapper.instance && !wrapper.isAlias)
.forEach((wrapper: InstanceWrapper) => {
if (wrapper.isAlias) {
return;
}
const { instance } = wrapper;
const prototype = Object.getPrototypeOf(instance) || {};
const isRequestScoped = !wrapper.isDependencyTreeStatic();
Expand Down

0 comments on commit ce045e7

Please sign in to comment.