This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-04-29
Channels
- # announcements (1)
- # babashka (15)
- # beginners (37)
- # calva (94)
- # cider (3)
- # clj-kondo (17)
- # cljsrn (2)
- # clojure (45)
- # clojure-europe (39)
- # clojure-germany (1)
- # clojure-norway (2)
- # clojurescript (16)
- # component (18)
- # conjure (1)
- # cursive (13)
- # datalevin (3)
- # datomic (12)
- # docker (2)
- # duct (5)
- # eastwood (2)
- # emacs (4)
- # events (8)
- # fulcro (8)
- # inf-clojure (5)
- # kaocha (8)
- # lsp (24)
- # malli (11)
- # meander (3)
- # off-topic (19)
- # polylith (11)
- # remote-jobs (4)
- # sci (61)
- # shadow-cljs (9)
- # spacemacs (34)
- # sql (10)
- # tools-deps (27)
- # xtdb (10)
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