top | item 20685057

(no title)

Lyrkan | 6 years ago

Yep, the comment is wrong, this line won't wait for anything but rather check that both calls resolved to a truthy value.

There are also some other incorrect things in that post that makes the code overly complicated, like:

> Every async function needs a new Promise, and needs to resolve()

That's definitely not needed unless you call something that runs asynchronously without being `async` or returning a standard `Promise` (in which case you could probably use a generic wrapper to convert them to `Promise` objects and avoid having to do that everytime).

discuss

order

No comments yet.