this post was submitted on 12 Sep 2023
21 points (86.2% liked)
Programming
17450 readers
78 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
For your own sanity, please use a formatter for your IDE. This will also help when others (and you) read the code, as indentation is a convenience for understanding program flow. From what I see:
enable
anddisable
functions are never called for this portion of codeenabled
variable, if so it never passes scopes between thehandleClick
andanimation
methodsawait
forinvoke
orupdateCurrentBox
, causing all the code after either to immediately run. As a result,enabled
is neverfalse
, since it just instantly flips back totrue
. I'm not sure what libraryinvoke
is from, but there should be a callback or the function returns aPromise
which can beawait
ed.