1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-08-18 13:48:58 +02:00
This commit is contained in:
sjaanus 2025-07-03 11:37:22 +03:00
parent 311b8e09d0
commit 82ac856f04
No known key found for this signature in database
GPG Key ID: 20E007C0248BA7FF

View File

@ -137,8 +137,7 @@ export default class AddonService {
handleEvent(eventName: string): (event: IEvent) => void {
const { addonProviders } = this;
return (event) => {
this.fetchAddonConfigs()
.then((addonInstances) => {
this.fetchAddonConfigs().then((addonInstances) => {
addonInstances
.filter((addon) => addon.events.includes(eventName))
.filter(
@ -165,18 +164,6 @@ export default class AddonService {
addon.id,
),
);
})
.catch((error) => {
if (error.message === 'aborted') {
this.logger.debug(
`Addon event handling aborted during shutdown for event ${eventName}`,
);
} else {
this.logger.warn(
`Failed to handle addon event ${eventName}:`,
error,
);
}
});
};
}