[#20971] fix: app crash when collectible max limit is nan (#20992)

This commit is contained in:
Mohsen 2024-08-09 21:39:07 +03:30 committed by GitHub
parent 35e71289dc
commit d53bef385a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 5 deletions

View File

@ -6,11 +6,12 @@
(defn collectible-balance
[collectible]
(-> collectible
(let [balance (-> collectible
:ownership
first
:balance
js/parseInt))
js/parseInt)]
(if (js/Number.isNaN balance) 0 balance)))
(def supported-collectible-types
#{"image/jpeg"