Skip to content

Commit

Permalink
Fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
LiliiaVol committed Dec 29, 2024
1 parent d14efab commit bdf8e36
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,10 @@ export const App: React.FC = () => {
) => {
event?.preventDefault();

const trimmedTitle = titleEdit.trim();
const trimmedTitleEdit = titleEdit.trim();
const prevTodo = todos.find(todo => todo.id === todoChangedTitle?.id);

if (!trimmedTitle) {
if (!trimmedTitleEdit) {
handleDeleteTodo(todoChangedTitle?.id || null);

return;
Expand All @@ -204,12 +204,12 @@ export const App: React.FC = () => {
if (
todoChangedTitle &&
prevTodo &&
trimmedTitle &&
trimmedTitle !== prevTodo.title
trimmedTitleEdit &&
trimmedTitleEdit !== prevTodo.title
) {
const updatedTodo: Todo = {
...todoChangedTitle,
title: trimmedTitle,
title: trimmedTitleEdit,
};

try {
Expand Down

0 comments on commit bdf8e36

Please sign in to comment.