Hacker News new | ask | show | jobs
by consilient 1099 days ago
> but I don't think the behavior here is surprising or strange at all.

Tell that to my junior coworkers. It's probably the single most common cause of async bugs in our codebase.

1 comments

Are you running those two lint rules I mentioned? They should completely remove cases of accidental floating promises.
Yes, but the floating isn't the issue: throwing in my example was just a concrete stand in for promise side effects in general. Running queries you only need in one not so common branch before the conditional gets checked, for instance.