Skip to content

Commit

Permalink
fix(): ignore aliased providers
Browse files Browse the repository at this point in the history
  • Loading branch information
matt1097 committed Aug 10, 2022
1 parent 4ba1837 commit 83aa87b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/event-subscribers.loader.ts
Expand Up @@ -47,6 +47,10 @@ export class EventSubscribersLoader
[...providers, ...controllers]
.filter(wrapper => wrapper.instance)
.forEach((wrapper: InstanceWrapper) => {
if (wrapper.isAlias) {
//Let the original provider handle events and not any of its aliases
return;
}
const { instance } = wrapper;
const prototype = Object.getPrototypeOf(instance) || {};
const isRequestScoped = !wrapper.isDependencyTreeStatic();
Expand Down

0 comments on commit 83aa87b

Please sign in to comment.