From e4d90eb055db06822d8242e4f22d087a621ff922 Mon Sep 17 00:00:00 2001 From: x032205 Date: Tue, 12 Aug 2025 12:12:31 -0700 Subject: [PATCH] Fix empty file infinite load --- .../components/SecretDropzone/SecretDropzone.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretDropzone/SecretDropzone.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretDropzone/SecretDropzone.tsx index 126306e3d..d7cb87da7 100644 --- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretDropzone/SecretDropzone.tsx +++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretDropzone/SecretDropzone.tsx @@ -241,7 +241,14 @@ export const SecretDropzone = ({ setIsLoading.on(); reader.onload = (event) => { - if (!event?.target?.result) return; + if (!event?.target?.result) { + createNotification({ + type: "error", + text: "Invalid file contents." + }); + setIsLoading.off(); + return; + } let env: TParsedEnv;