From 886a8c6bedea924bd12d2e3a62e4ab4cdf33b49d Mon Sep 17 00:00:00 2001 From: Cristhian Zanforlin Lousa <72977554+Cristhianzl@users.noreply.github.com> Date: Mon, 19 Aug 2024 16:39:48 -0300 Subject: [PATCH] fix: Remove unnecessary error return when all components are erased from a flow (#3433) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🔧 (use-save-flow.ts): remove unnecessary error data setting when saving an empty flow to improve code readability and maintainability --- src/frontend/src/hooks/flows/use-save-flow.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/frontend/src/hooks/flows/use-save-flow.ts b/src/frontend/src/hooks/flows/use-save-flow.ts index 117273ca4..cd797146a 100644 --- a/src/frontend/src/hooks/flows/use-save-flow.ts +++ b/src/frontend/src/hooks/flows/use-save-flow.ts @@ -77,10 +77,6 @@ const useSaveFlow = () => { }, ); } else { - setErrorData({ - title: "Failed to save flow", - list: ["Can't save empty flow"], - }); setSaveLoading(false); reject(new Error("Can't save empty flow")); }