mirror of
https://github.com/penpot/penpot.git
synced 2025-02-01 11:59:17 -05:00
Cleanup
This commit is contained in:
parent
656cc00923
commit
b924bbc9c7
1 changed files with 6 additions and 6 deletions
|
@ -200,18 +200,18 @@
|
||||||
(fn [e]
|
(fn [e]
|
||||||
(dom/prevent-default e)
|
(dom/prevent-default e)
|
||||||
(let [final-name (finalize-name @name-ref)
|
(let [final-name (finalize-name @name-ref)
|
||||||
valid-name+ (-> (validate-name final-name) schema-validation->promise)
|
valid-name?+ (-> (validate-name final-name) schema-validation->promise)
|
||||||
final-value (finalize-value @value-ref)
|
final-value (finalize-value @value-ref)
|
||||||
final-description @description-ref
|
final-description @description-ref
|
||||||
valid-description+ (some-> final-description validate-descripion schema-validation->promise)]
|
valid-description?+ (some-> final-description validate-descripion schema-validation->promise)]
|
||||||
(-> (p/all [valid-name+
|
(-> (p/all [valid-name?+
|
||||||
valid-description+
|
valid-description?+
|
||||||
(validate-token-value+ {:input final-value
|
(validate-token-value+ {:input final-value
|
||||||
:name-value final-name
|
:name-value final-name
|
||||||
:token token
|
:token token
|
||||||
:tokens tokens})])
|
:tokens tokens})])
|
||||||
(p/finally (fn [xs err]
|
(p/finally (fn [result err]
|
||||||
(when (and (seq xs) (not err))
|
(when (and (seq result) (not err))
|
||||||
(let [token (cond-> {:name final-name
|
(let [token (cond-> {:name final-name
|
||||||
:type (or (:type token) token-type)
|
:type (or (:type token) token-type)
|
||||||
:value final-value}
|
:value final-value}
|
||||||
|
|
Loading…
Add table
Reference in a new issue