From ac656ea81ffd7f920f16d0377550532b92033c2d Mon Sep 17 00:00:00 2001 From: Alexander Petric Date: Fri, 3 Oct 2025 17:48:11 -0400 Subject: [PATCH] fix: init git repo preview save (#6753) --- frontend/src/lib/services/JobManager.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/lib/services/JobManager.ts b/frontend/src/lib/services/JobManager.ts index d0d8be5d54..ab5508efce 100644 --- a/frontend/src/lib/services/JobManager.ts +++ b/frontend/src/lib/services/JobManager.ts @@ -78,7 +78,9 @@ export class JobManager { try { onProgress?.({ status: 'running' }) - const result = await tryEvery({ + let finalResult: T | undefined = undefined + + await tryEvery({ tryCode: async () => { if (controller.signal.aborted) { throw new Error('Job was cancelled') @@ -103,6 +105,8 @@ export class JobManager { onProgress?.(status) + finalResult = jobResult.result as T + return jobResult.result as T }, timeoutCode: async () => { @@ -123,7 +127,7 @@ export class JobManager { timeout }) - return result as T + return finalResult as T } finally { this.activeJobs.delete(jobId) }