-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
To anyone having issues their server crashing when they're deleting todos
You can fix this by removing the completeTodo onClick event in the .Todo div and putting it in the .checkbox div or .text div instead
<div classname="text" onClick = completeTodo(todo._id)}> ... </div>
I think it's cause the onClick event (the completeTodo PUT request) is in the .Todo div which contains the delete div as chid and that causes two functions to run at the same time when you click on the delete X, the task is deleted then the completeTodo function will try to mark the task as completed or not but the task is now inexistent, so there's nothing to mark, hence the error
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels