Design comparison
Community feedback
- @dylanguaquierPosted about 1 year ago
index-8c42ae4f.js:40 Uncaught TypeError: Cannot read properties of undefined (reading 'isChecked') at index-8c42ae4f.js:40:60534 at Array.map (<anonymous>) at Dd (index-8c42ae4f.js:40:60379) at gi (index-8c42ae4f.js:38:19468) at Po (index-8c42ae4f.js:40:3134) at Za (index-8c42ae4f.js:40:44482) at Ya (index-8c42ae4f.js:40:39510) at vd (index-8c42ae4f.js:40:39441) at br (index-8c42ae4f.js:40:39300) at Uo (index-8c42ae4f.js:40:35718)
This is the error in the console
Marked as helpful1 - @dylanguaquierPosted about 1 year ago
Great job :), i don't know if it is only me but when i have spam delete thoses tasks everything disapeared
Marked as helpful1@TheRequiemPosted about 1 year ago@Fullpacki Thanks, what do you mean by spamming delete? By deleting using the "X" or deleting by checking and clicking "Clear Selected"?
0@dylanguaquierPosted about 1 year ago@TheRequiem When i spam click the "X" icon, (try to realy full spam X) everything disapear and i have there is still the background showing
1@TheRequiemPosted about 1 year ago@Fullpacki
Hmm, I can't spam the 'x' after another, so I can't really replicate the problem but I will take your word for it
1@TheRequiemPosted about 1 year ago@Fullpacki
@@adityaphasu
I actually found the problem and replicated it. It's not by spamming 'x' but by drag and dropping 'x' into 'x'. I can fix it easily by disabling drag and drop there. Thanks for the find @Fullpacki
1 - @adityaphasuPosted about 1 year ago
@Fullpacki @TheRequiem It might be that when you spam click too fast the function handling the cross button is running into race conditions that is competing for access to modify the same data at the same time. I did try to replicate the problem but there wasn't any on my part....or I wasn't fast enough in spamming lol.
1@dylanguaquierPosted about 1 year ago@adityaphasu Hahaha maybe, at least a todo isn't done for spamming delete buttons :D
0@adityaphasuPosted about 1 year ago@Fullpacki haha for real but while for a project this is okay (and @TheRequiem don't worry about it) in a real life app/web app this is quite a big possibility say a person on a mobile spam clicks the cross button and this happens. This can potentially be categorized as an edge case I think but to solve this you'd have to change the code quite specifically to handle these type of situations 🤖
1@TheRequiemPosted about 1 year ago@adityaphasu
Yeah that seems possible, maybe a quick solution can be that I add a slight timeout event and disable the button to give it time and make sure that the users are not able to spam or maybe instead of timeout try to set up a promise for when the state array is done and modified, only then will the 'x' button will be enabled?
1@adityaphasuPosted about 1 year ago@TheRequiem I thought of the timeout myself and it should be simple fix like if the user tries to click the button again it will only work if like the last one they clicked has done/completed it's operation
1@TheRequiemPosted about 1 year ago@adityaphasu
Apparently, it's not because of spamming 'x' but because of drag and dropping 'x' on the same 'x'. I just need to include it to ignore drag and drop in the condition and it should be fine!
1
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord