Fix bug in promise-all

This commit is contained in:
arne 2025-11-19 20:49:57 +01:00
commit b7fce71a17

View file

@ -35,7 +35,7 @@
;; Mastodon API helpers
(defn- promise-all [xs]
(js/Promise.all (clj->js xs)))
(js/Promise.all (apply array xs)))
(defn- promise-resolve [val]
(js/Promise.resolve val))
@ -178,7 +178,7 @@
(.then (fn [application]
(let [code (oauth-authorization-code (.-location js/window))]
(cond
(:bearer_token application) (js/Promise.resolve application)
(:bearer_token application) application
(and application code)
(handle-oauth-authorization-code!