Fork me on GitHub

Hello everyone, got an issue on an expo app while using js/Promise.all . The problems is that on production mode (run with expo start --no-dev --minify) seems like Promise.all just passes an empty vector to then (or so it seems). Here’s an example:

(def sum (atom 0))
(-> sum)
(.. (js/Promise.all (mapv js/Promise.resolve [1 2 3 4]))
    (then #(reset! sum (apply + %))))
Can anyone reproduce this issue and if so, any ideas regarding why this might be happening. It works fine in dev mode.


Just found out that this fixes the issue:

(.. (js/Promise.all (apply array (mapv js/Promise.resolve [1 2 3 4])))
    (then #(reset! sum (apply + %))))

👍 1