mirror of
https://github.com/penpot/penpot.git
synced 2026-04-25 19:28:12 +00:00
Improve parse-int function.
This commit is contained in:
parent
6e36718702
commit
48819a1738
@ -94,7 +94,7 @@
|
||||
|
||||
(defn parse-int
|
||||
([v]
|
||||
(js/parseInt v 10))
|
||||
(parse-int v nil))
|
||||
([v default]
|
||||
(let [v (js/parseInt v 10)]
|
||||
(if (or (not v) (nan? v))
|
||||
@ -103,7 +103,7 @@
|
||||
|
||||
(defn parse-float
|
||||
([v]
|
||||
(js/parseFloat v))
|
||||
(parse-float v nil))
|
||||
([v default]
|
||||
(let [v (js/parseFloat v)]
|
||||
(if (or (not v) (nan? v))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user