mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 23:49:45 -05:00
🐛 Remove a decimal sets value to 0 (refactor)
This commit is contained in:
parent
aa386e12bc
commit
f0a9889f33
1 changed files with 1 additions and 4 deletions
|
@ -76,11 +76,8 @@
|
|||
(mf/deps ref min-val max-val value nillable default-val)
|
||||
(fn []
|
||||
(let [input-node (mf/ref-val ref)
|
||||
drop-ending-point #(if (str/ends-with? % ".")
|
||||
(str/join "" (drop-last %))
|
||||
%)
|
||||
new-value (-> (dom/get-value input-node)
|
||||
(drop-ending-point)
|
||||
(str/strip-suffix ".")
|
||||
(sm/expr-eval value))]
|
||||
(cond
|
||||
(d/num? new-value)
|
||||
|
|
Loading…
Add table
Reference in a new issue