0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 23:18:48 -05:00

🐛 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

@ -20,12 +20,14 @@
:depends-on #{:shared}}}
:compiler-options
{:output-feature-set :es8
;; :optimizations :simple
:output-wrapper false}
:release
{:compiler-options
{:fn-invoke-direct true
:source-map true
;; :pseudo-names true
;; :pretty-print true
:anon-fn-naming-policy :off
:source-map-detail-level :all}}}

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]