pitch-io/cljest

Fix `async` with multiple `let` bindings

Closed this issue · 0 comments

jo-sm commented

async isn't working with multiple let bindings if any later binding uses an earlier one:

(async
  (let [something "yes"
        result (await (js/Promise.resolve something))]
    ...)

This will fail because we internally turn that into Promise.all, so we need to be smarter and handle each binding based on if they are await-ed or not.