aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/packages/ui/src/components/instance-creation-modal.tsx
diff options
context:
space:
mode:
authorkrypton <krypton@hydroroll.team>2026-03-31 08:59:58 +0800
committerkrypton <krypton@hydroroll.team>2026-03-31 08:59:58 +0800
commit7adcf5b548b2638032f36957889711cf78dbf851 (patch)
tree4eb14fef39aa0eabdd25b9a63e12be75a2181cb8 /packages/ui/src/components/instance-creation-modal.tsx
parent5f93323760fb46f06d391996f17e87b7405769d4 (diff)
downloadDropOut-fix/download-progress-bugs.tar.gz
DropOut-fix/download-progress-bugs.zip
fix: resolve cleanup and formatBytes bugs in download progressfix/download-progress-bugs
Diffstat (limited to 'packages/ui/src/components/instance-creation-modal.tsx')
-rw-r--r--packages/ui/src/components/instance-creation-modal.tsx5
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]);