fix(medusa, types, utils, event-bus-local): Revert retrieveSubscribers (#4002)
* fix(medusa, event-bus-redis, event-bus-local): Revert retrieveSubscribers as the wildcard prevent us from filtering * Create calm-eggs-collect.md --------- Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
bcaaa0288b
commit
0e488e71b1
@@ -50,10 +50,6 @@ export abstract class AbstractEventBusModuleService
|
||||
])
|
||||
}
|
||||
|
||||
public retrieveSubscribers(event: string | symbol) {
|
||||
return this.eventToSubscribersMap_.get(event)
|
||||
}
|
||||
|
||||
public subscribe(
|
||||
eventName: string | symbol,
|
||||
subscriber: EventBusTypes.Subscriber,
|
||||
@@ -88,7 +84,7 @@ export abstract class AbstractEventBusModuleService
|
||||
throw new Error("Subscriber must be a function")
|
||||
}
|
||||
|
||||
const existingSubscribers = this.retrieveSubscribers(eventName)
|
||||
const existingSubscribers = this.eventToSubscribersMap_.get(eventName)
|
||||
|
||||
if (existingSubscribers?.length) {
|
||||
const subIndex = existingSubscribers?.findIndex(
|
||||
|
||||
Reference in New Issue
Block a user