From 9d051a2b6c1240f3e881dcd02dee64476f720a1c Mon Sep 17 00:00:00 2001 From: Artem Medeu Date: Mon, 9 Jan 2023 17:07:29 +0600 Subject: [PATCH] fix(resolve-symbol): pass through non symbols --- src/k16/gx/beta/core.cljc | 4 ++-- src/k16/gx/beta/impl.cljc | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/k16/gx/beta/core.cljc b/src/k16/gx/beta/core.cljc index 71a1e95..e690a72 100644 --- a/src/k16/gx/beta/core.cljc +++ b/src/k16/gx/beta/core.cljc @@ -326,8 +326,8 @@ (with-err-ctx err-ctx (if (fn? resolved-props-fn) (run-props-fn resolved-props-fn dep-nodes-vals) - (impl/postwalk-evaluate - dep-nodes-vals resolved-props props))) + (impl/postwalk-evaluate + dep-nodes-vals resolved-props props))) validate-error (with-err-ctx err-ctx (validate-props props-schema props-result)) [error result] (when-not validate-error diff --git a/src/k16/gx/beta/impl.cljc b/src/k16/gx/beta/impl.cljc index 9490be1..5bde4d3 100644 --- a/src/k16/gx/beta/impl.cljc +++ b/src/k16/gx/beta/impl.cljc @@ -181,7 +181,7 @@ (defn resolve-symbol [sym] - (when (symbol? sym) + (if (symbol? sym) (if-let [nss #?(:cljs (namespace-symbol sym) :clj (try (some->> sym @@ -195,7 +195,8 @@ :exception e}))))] nss (gx.err/add-err-cause {:title :symbol-cannot-be-resolved - :data sym})))) + :data sym})) + sym)) (defn form->runnable [form-def] (let [props* (atom #{})