From 6f0d0ef27576b429b5c72554617a59fff0ceb92b Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Sat, 15 Aug 2026 09:06:07 -0700 Subject: [PATCH] Don't save response when the file dialog is cancelled --- apps/yaak-client/hooks/useSaveResponse.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/yaak-client/hooks/useSaveResponse.tsx b/apps/yaak-client/hooks/useSaveResponse.tsx index 31bb2575..eda2c9b6 100644 --- a/apps/yaak-client/hooks/useSaveResponse.tsx +++ b/apps/yaak-client/hooks/useSaveResponse.tsx @@ -25,6 +25,10 @@ export function useSaveResponse(response: HttpResponse | null) { defaultPath: ext ? `${slug}.${ext}` : slug, title: "Save Response", }); + if (filepath == null) { + return; // Cancelled + } + await rpc("cmd_save_response", { responseId: response.id, filepath }); showToast({ message: (