mirror of
https://github.com/penpot/penpot.git
synced 2025-05-17 22:16:10 +02:00
Improve parse-int function.
This commit is contained in:
parent
6e36718702
commit
48819a1738
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue