diff options
Diffstat (limited to 'packages/ui/src/components/instance-creation-modal.tsx')
| -rw-r--r-- | packages/ui/src/components/instance-creation-modal.tsx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/ui/src/components/instance-creation-modal.tsx b/packages/ui/src/components/instance-creation-modal.tsx index 5b50513..e3fbf23 100644 --- a/packages/ui/src/components/instance-creation-modal.tsx +++ b/packages/ui/src/components/instance-creation-modal.tsx @@ -129,9 +129,8 @@ export function InstanceCreationModal({ open, onOpenChange }: Props) { downloadStore.init(); } return () => { - if (!open) { - downloadStore.cleanup(); - } + // Always cleanup event listeners when effect re-runs or unmounts + downloadStore.cleanup(); }; }, [open, downloadStore.init, downloadStore.cleanup]); |