mirror of
https://github.com/penpot/penpot.git
synced 2025-06-06 11:11:39 +02:00
🐛 Fix util object impl.
This commit is contained in:
parent
bee543da74
commit
76cf9e1bb0
3 changed files with 9 additions and 9 deletions
|
@ -20,12 +20,14 @@
|
||||||
:depends-on #{:shared}}}
|
:depends-on #{:shared}}}
|
||||||
:compiler-options
|
:compiler-options
|
||||||
{:output-feature-set :es8
|
{:output-feature-set :es8
|
||||||
;; :optimizations :simple
|
|
||||||
:output-wrapper false}
|
:output-wrapper false}
|
||||||
|
|
||||||
:release
|
:release
|
||||||
{:compiler-options
|
{:compiler-options
|
||||||
{:fn-invoke-direct true
|
{:fn-invoke-direct true
|
||||||
:source-map true
|
:source-map true
|
||||||
|
;; :pseudo-names true
|
||||||
|
;; :pretty-print true
|
||||||
:anon-fn-naming-policy :off
|
:anon-fn-naming-policy :off
|
||||||
:source-map-detail-level :all}}}
|
:source-map-detail-level :all}}}
|
||||||
|
|
||||||
|
|
|
@ -12,9 +12,9 @@
|
||||||
|
|
||||||
(this-as global
|
(this-as global
|
||||||
(let [config (obj/get global "uxboxConfig")
|
(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 default-language "en")
|
||||||
(def demo-warning (obj/get config "demoWarning" true))
|
(def demo-warning warn)
|
||||||
(def url public-url)
|
(def url url)
|
||||||
(def default-theme "default")))
|
(def default-theme "default")))
|
||||||
|
|
||||||
|
|
|
@ -14,12 +14,10 @@
|
||||||
|
|
||||||
(defn get
|
(defn get
|
||||||
([obj k]
|
([obj k]
|
||||||
(when (object? obj)
|
(when-not (nil? obj)
|
||||||
(unchecked-get obj k)))
|
(unchecked-get obj k)))
|
||||||
([obj k default]
|
([obj k default]
|
||||||
(if (object? obj)
|
(or (get obj k) default)))
|
||||||
(or (unchecked-get obj k) default)
|
|
||||||
default)))
|
|
||||||
|
|
||||||
(defn get-in
|
(defn get-in
|
||||||
[obj keys]
|
[obj keys]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue