Comment

Comment by Lyrkan

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).

parent Lyrkan 7 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton