Skip to content

Commit

Permalink
Fix deferred initialization with exception.
Browse files Browse the repository at this point in the history
  • Loading branch information
niwinz committed Sep 15, 2019
1 parent 2db4bee commit 9325161
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/promesa/core.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
(c/let [d (impl/empty-deferred)
v (pt/-promise v)]
(pt/-bind v #(pt/-resolve! d %) executor)
(pt/-catch v #(pt/-reject! d %))
d)))

(defn promise
Expand Down

0 comments on commit 9325161

Please sign in to comment.