🐛 Fix util object impl.

This commit is contained in:
Andrey Antukh 2020-05-05 12:34:51 +02:00
parent bee543da74
commit 76cf9e1bb0
3 changed files with 9 additions and 9 deletions

View file

@ -12,9 +12,9 @@
(this-as global
(let [config (obj/get global "uxboxConfig")
public-url (obj/get config "publicURL" "http://localhost:6060")]
url (obj/get config "publicURL" "http://localhost:6060")
warn (obj/get config "demoWarning" true)]
(def default-language "en")
(def demo-warning (obj/get config "demoWarning" true))
(def url public-url)
(def demo-warning warn)
(def url url)
(def default-theme "default")))

View file

@ -14,12 +14,10 @@
(defn get
([obj k]
(when (object? obj)
(when-not (nil? obj)
(unchecked-get obj k)))
([obj k default]
(if (object? obj)
(or (unchecked-get obj k) default)
default)))
(or (get obj k) default)))
(defn get-in
[obj keys]