mirror of https://github.com/status-im/pluto.git
Replace unknown symbols with nil
This commit is contained in:
parent
4de10d1d4b
commit
c502b85fe7
|
@ -63,7 +63,8 @@
|
|||
:properties {:view :view}}}
|
||||
:events {'alert
|
||||
{:permissions [:read]
|
||||
:value :alert}}}}
|
||||
:value :alert
|
||||
:arguments {:value :string}}}}}
|
||||
m))
|
||||
|
||||
(defn render-extension [m el el-errors]
|
||||
|
|
|
@ -30,8 +30,14 @@
|
|||
(assoc m o resolved-value)
|
||||
(merge m o))))
|
||||
|
||||
(defn let-block [{:keys [env ctx ext]} children]
|
||||
(walk/prewalk-replace (reduce-kv assoc-binding {} env) children))
|
||||
(defn replace-atom [values o]
|
||||
(cond (contains? values o) (get values o)
|
||||
(symbol? o) nil
|
||||
:else o))
|
||||
|
||||
(defn let-block [{:keys [env]} children]
|
||||
(let [values (reduce-kv assoc-binding {} env)] ;
|
||||
(walk/prewalk #(replace-atom values %) children)))
|
||||
|
||||
(defn properties? [o]
|
||||
(= 'properties o))
|
||||
|
|
Loading…
Reference in New Issue