mirror of
https://github.com/penpot/penpot.git
synced 2025-05-31 02:46:12 +02:00
🐛 Fix util object impl.
This commit is contained in:
parent
bee543da74
commit
76cf9e1bb0
3 changed files with 9 additions and 9 deletions
|
@ -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")))
|
||||
|
||||
|
|
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue