mirror of
https://github.com/Unleash/unleash.git
synced 2025-08-18 13:48:58 +02:00
fix: tear down also event handlers in addon service
This commit is contained in:
parent
bfbdc1f65a
commit
311b8e09d0
@ -367,7 +367,6 @@ export default class AddonService {
|
||||
}
|
||||
|
||||
destroy(): void {
|
||||
// Clean up event handlers first to prevent race conditions during teardown
|
||||
this.eventHandlers.forEach((handler, eventName) => {
|
||||
try {
|
||||
this.eventService.off(eventName, handler);
|
||||
@ -380,7 +379,6 @@ export default class AddonService {
|
||||
});
|
||||
this.eventHandlers.clear();
|
||||
|
||||
// Then destroy addon providers
|
||||
Object.values(this.addonProviders).forEach((addon) =>
|
||||
addon.destroy?.(),
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user