mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
fix: don't create block for invalid number property value
This commit is contained in:
@@ -251,9 +251,9 @@
|
|||||||
(= :logseq.property/empty-placeholder (:db/ident (d/entity @conn v)))))))
|
(= :logseq.property/empty-placeholder (:db/ident (d/entity @conn v)))))))
|
||||||
v
|
v
|
||||||
;; only value-ref-property types should call this
|
;; only value-ref-property types should call this
|
||||||
(let [v' (if (and number-property? (string? v))
|
(when-let [v' (if (and number-property? (string? v))
|
||||||
(parse-double v)
|
(parse-double v)
|
||||||
v)]
|
v)]
|
||||||
(find-or-create-property-value conn property-id v')))))
|
(find-or-create-property-value conn property-id v')))))
|
||||||
|
|
||||||
(defn- throw-error-if-self-value
|
(defn- throw-error-if-self-value
|
||||||
|
|||||||
@@ -1241,7 +1241,9 @@
|
|||||||
(set-editing! false))))]
|
(set-editing! false))))]
|
||||||
[:div.ls-number.flex.flex-1.jtrigger
|
[:div.ls-number.flex.flex-1.jtrigger
|
||||||
{:ref *ref
|
{:ref *ref
|
||||||
:on-click #(set-editing! true)}
|
:on-click #(do
|
||||||
|
(state/clear-selection!)
|
||||||
|
(set-editing! true))}
|
||||||
(if editing?
|
(if editing?
|
||||||
(shui/input
|
(shui/input
|
||||||
{:ref *input-ref
|
{:ref *input-ref
|
||||||
|
|||||||
Reference in New Issue
Block a user