Skip to content

Commit

Permalink
fix_: ensure we don't throw if bignumber fails to compare, instead re…
Browse files Browse the repository at this point in the history
…turn false
  • Loading branch information
seanstrom committed Sep 19, 2024
1 parent 6622341 commit d88e07a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils/money.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@
(defn equal-to
[n1 n2]
(when-let [^js bn1 (bignumber n1)]
(.eq ^js bn1 n2)))
(try
(.eq ^js bn1 n2)
(catch :default _ false))))

(extend-type BigNumber
IEquiv
Expand Down

0 comments on commit d88e07a

Please sign in to comment.