Skip to content

Commit

Permalink
Remove unneccessary seq caught in code review
Browse files Browse the repository at this point in the history
Also make read-string parsing consistent, even if they are aliased
  • Loading branch information
logseq-cldwalker authored and andelf committed Dec 7, 2022
1 parent 83d5e57 commit b7cf6b1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/main/frontend/handler/global_config.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
[frontend.handler.notification :as notification]
[frontend.schema.handler.global-config :as global-config-schema]
[frontend.state :as state]
[cljs.reader :as reader]
[promesa.core :as p]
[shadow.resource :as rc]
[malli.error :as me]
Expand Down Expand Up @@ -39,7 +38,7 @@

(defn- set-global-config-state!
[content]
(let [config (reader/read-string content)]
(let [config (edn/read-string content)]
(state/set-global-config! config)
config))

Expand Down Expand Up @@ -77,10 +76,7 @@ nested keys or positional errors e.g. tuples"

(defn- validate-config-map
[m path]
(if-let [errors (->> m
(m/explain global-config-schema/Config-edn)
me/humanize
seq)]
(if-let [errors (->> m (m/explain global-config-schema/Config-edn) me/humanize)]
(do
(notification/show! (gstring/format "The file '%s' has the following errors:\n%s"
path
Expand Down

0 comments on commit b7cf6b1

Please sign in to comment.