From 460019e01b6d14923f96d196fffbe7909ae369c9 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 4 Feb 2020 22:04:22 +0100 Subject: [PATCH] :bug: Minor fix on build params. --- frontend/tools.clj | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/frontend/tools.clj b/frontend/tools.clj index 60868336e..fc95e1eca 100644 --- a/frontend/tools.clj +++ b/frontend/tools.clj @@ -29,20 +29,12 @@ ;; --- Generic Build Options (def closure-defines - (let [url (-> (:uxbox-api-url env "http://127.0.0.1:6060") - (str/trim)) - demo-warn (-> (:uxbox-demo-warning env "") - (str/trim))] - {'uxbox.config.url - (cond - (empty? url) "http://localhost:6060" - (str/starts-with? url "http") url - (str/starts-with? url "\"") (edn/read-string url)) - 'uxbox.config.demo-warning - (cond - (empty? demo-warn) false - (= "true" demo-warn) true - :else false)})) + (let [url (some-> (:uxbox-api-url env) + (str/trim)) + demo-warn (some-> (:uxbox-demo-warning env) + (str/trim))] + {'uxbox.config.url (if (nil? url) "http://localhost:6060" url) + 'uxbox.config.demo-warning (= "true" demo-warn)})) (def default-build-options {:cache-analysis true