Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Remove spurious let #71

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 12 additions & 13 deletions src/clojure/neko/ui/mapping.clj
Original file line number Diff line number Diff line change
Expand Up @@ -172,19 +172,18 @@
keyword can be extracted from :value-namespaces map for element's
mapping."
[element-kw value & [attribute]]
(let [mapping @keyword-mapping]
(if-not (keyword? value)
(cond
(integer? value) (int value)
(float? value) (float value)
:else value)
(or (recursive-find (list element-kw :values value))
(reflect-field
(classname
(or (and attribute
(recursive-find [element-kw :value-namespaces attribute]))
element-kw))
(keyword->static-field value))))))
(if-not (keyword? value)
(cond
(integer? value) (int value)
(float? value) (float value)
:else value)
(or (recursive-find (list element-kw :values value))
(reflect-field
(classname
(or (and attribute
(recursive-find [element-kw :value-namespaces attribute]))
element-kw))
(keyword->static-field value)))))

(defn add-default-atribute-value!
"Adds a default attribute value for the given element."
Expand Down