From a0e6fe8481b8528975c2ede144931f5b2757e9a2 Mon Sep 17 00:00:00 2001 From: Karishma Shukla Date: Tue, 23 Sep 2025 20:21:24 +0530 Subject: [PATCH] fix: instant discard redirect --- src/components/browser/BrowserRecordingSave.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/browser/BrowserRecordingSave.tsx b/src/components/browser/BrowserRecordingSave.tsx index 2adfcd79..32d0faba 100644 --- a/src/components/browser/BrowserRecordingSave.tsx +++ b/src/components/browser/BrowserRecordingSave.tsx @@ -41,8 +41,6 @@ const BrowserRecordingSave = () => { const goToMainMenu = async () => { if (browserId) { - await stopRecording(browserId); - const notificationData = { type: 'warning', message: t('browser_recording.notifications.terminated'), @@ -65,6 +63,10 @@ const BrowserRecordingSave = () => { setBrowserId(null); window.close(); + + stopRecording(browserId).catch((error) => { + console.warn('Background cleanup failed:', error); + }); } }; @@ -242,4 +244,4 @@ const modalStyle = { height: 'fit-content', display: 'block', padding: '20px', -}; \ No newline at end of file +};