From b87a52a5dff7034ad78ce7aa841990bb0c8a4d0d Mon Sep 17 00:00:00 2001 From: RuslanMudruj <13072003.rm@gmail.com> Date: Tue, 7 Jan 2025 14:55:06 +0200 Subject: [PATCH] solution7 --- src/components/TodoHeader.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/TodoHeader.tsx b/src/components/TodoHeader.tsx index 393b982d4..638aabcda 100644 --- a/src/components/TodoHeader.tsx +++ b/src/components/TodoHeader.tsx @@ -56,10 +56,10 @@ export const TodoHeader: React.FC = ({ try { await addNewTodo(); changeQuery(''); - } finally { - setDisabledSearchInput(false); - searchInput.current?.focus(); - } + } catch (err) {} + + setDisabledSearchInput(false); + searchInput.current?.focus(); }; const toggleAllHandler = async () => {