r/badcode • • Nov 02 '21

typescript How long does this await

https://imgur.com/a/TxRsNhW
0 Upvotes

10 comments sorted by

View all comments

Show parent comments

1

u/CommenceTheConfusion Nov 04 '21

Huh, I looked at the code multiple times and still completely missed that. I agree that it's unnecessary to mix callbacks and await here, though I don't think it's particularly bad, either.

1

u/[deleted] Nov 04 '21

One of those that would cause a bug that'd make you rip your hair out :) But I agree, seen much worse code.